- Issue created by @mondrake
- Status changed to Needs review
11 months ago 11:24am 4 March 2024 - Status changed to RTBC
11 months ago 2:20pm 4 March 2024 - ๐บ๐ธUnited States smustgrave
Typehints make sense. Removing from deprecation-ignore didn't cause failures, which I find is a good sign for these kind of tickets.
-
longwave โ
committed ff7c5de3 on 11.x
Issue #3425337 by mondrake: Fix root namespace classes DebugClassLoader...
-
longwave โ
committed ff7c5de3 on 11.x
- Status changed to Fixed
11 months ago 3:38pm 4 March 2024 - Status changed to Needs work
11 months ago 3:51pm 4 March 2024 - ๐ฌ๐งUnited Kingdom catch
This is causing unit tests to fail with a deprecation warning https://git.drupalcode.org/project/drupal/-/jobs/978330 Not sure how the pipeline here passed, maybe a cross-commit?
- ๐ฎ๐นItaly mondrake ๐ฎ๐น
Deprecation of the DebugClassLoader are very fragile... also noticed that in ๐ Upgrade PHPUnit to 10, drop Symfony PHPUnit-bridge dependency Fixed , where by filling the gap of symfony-bridge I found more errors reported. The strange thing here is that this appears to have dfferent behaviour in MR testing vs branch testing...
- Status changed to RTBC
11 months ago 4:52pm 4 March 2024 -
longwave โ
committed ea9cc753 on 11.x
Issue #3425337 by mondrake: Fix root namespace classes DebugClassLoader...
-
longwave โ
committed ea9cc753 on 11.x
- Status changed to Fixed
11 months ago 4:56pm 4 March 2024 - ๐ฌ๐งUnited Kingdom longwave UK
Maybe I missed it somehow when I committed?! Trying again...
- ๐ฌ๐งUnited Kingdom longwave UK
Should we have another issue to remove all remaining
#[ReturnTypeWillChange]
in 11.x? - ๐ฎ๐นItaly mondrake ๐ฎ๐น
Indeed, some seem not to have been reported... I will check with ๐ Upgrade PHPUnit to 10, drop Symfony PHPUnit-bridge dependency Fixed . Sure we need a followup.
- ๐ฌ๐งUnited Kingdom catch
If I run this test locally:
../vendor/bin/phpunit modules/file/tests/src/Functional/FileAddPermissionsUpdateTest.php
I get
1) Drupal\Tests\file\Functional\FileAddPermissionsUpdateTest::testUpdate Exception: Deprecated function: Return type of Drupal\Component\Annotation\Doctrine\StaticReflectionClass::getStaticProperties(): ?array should either be compatible with ReflectionClass::getStaticProperties(): array, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice include()() (Line: 32)
- ๐บ๐ธUnited States tedbow Ithaca, NY, USA
@catch just found this too
I found this issue because for some reason gitlabci started to test with 8.3 when we were testing the Automatic Updates module with core 11.xIn the commit
- #[\ReturnTypeWillChange] - public function getStaticProperties() + public function getStaticProperties(): ?array
I think this will cause an error on PHP 8.3 because
ReflectionClass::getStaticProperties(): ?array
was changed toReflectionClass::getStaticProperties(): array
so removing the `ReturnTypeWillChange
` actually makes this not compatible with PHP 8.3's return type. I couldn't tell if core itself or this merge request was tested on PHP 8.3(still getting use to the UI) but looks like 11.x should support PHP 8.3, correct? - ๐ฎ๐นItaly mondrake ๐ฎ๐น
Notice is right, the signature is
public ReflectionClass::getStaticProperties(): array
, https://www.php.net/manual/it/reflectionclass.getstaticproperties.phpWill fix it in ๐ Fix remaining methods with #[\ReturnTypeWillChange] attribute RTBC that is still to be committed.
- ๐ซ๐ทFrance andypost
Maybe it's time to enable 8.3 as default for 11.x?
- ๐ฌ๐งUnited Kingdom longwave UK
Yep we already agreed ๐ฑ [11.x] [policy] Require PHP 8.3 for Drupal 11 RTBC we should change this in 11.x now.
- ๐ฎ๐นItaly mondrake ๐ฎ๐น
I think this needs to be temporarily reverted, and ๐ Make PHP 8.3 the default environment for gitlab CI runs Fixed done first. BTW thereโs a sorting test that fails on PHP 8.3 and I think itโs unrelated.
- ๐ฌ๐งUnited Kingdom longwave UK
@mondrake was watching your test runs on the other issue and have come to the same conclusion.
- Status changed to Needs work
11 months ago 11:11pm 5 March 2024 -
longwave โ
committed c5c85f18 on 11.x
Revert "Issue #3425337 by mondrake: Fix root namespace classes...
-
longwave โ
committed c5c85f18 on 11.x
- Status changed to RTBC
11 months ago 11:20am 6 March 2024 -
longwave โ
committed f330fa37 on 11.x
Issue #3425337 by mondrake: Fix root namespace classes DebugClassLoader...
-
longwave โ
committed f330fa37 on 11.x
- Status changed to Fixed
11 months ago 3:02pm 6 March 2024 -
longwave โ
committed bd3e71a8 on 11.x
Issue #3425337 by mondrake: Fix root namespace classes DebugClassLoader...
-
longwave โ
committed bd3e71a8 on 11.x
Automatically closed - issue fixed for 2 weeks with no activity.