You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<?php
#[Attribute(Attribute::TARGET_CLASS)]
final class Table {
public function __construct(public readonly string $name) {}
}
#[Table('users')]
class TestClass {}
$testClass = new TestClass();
$attributes = (new ReflectionClass($testClass))->getAttributes();
var_dump($attributes);
foreach ($attributes as $attribute) {
var_dump($attribute->newInstance());
}
I tested webdevops/php:8.1-alpine, and this same code worked there as expected.
I tested webdevops/php-apache:8.1-alpine, and this also worked as expected.
I tested webdevops/php-dev:8.1-alpine, and this failed.
I tested webdevops/php-dev:8.2-alpine, and this worked.
I tested webdevops/php-dev:8.3-alpine, and this worked.
I tested php:8.1-fpm-alpine, and this worked!
Clearly, something about the -dev version of specifically your flavor of PHP 8.1 fails.
Maybe also 8.0, but I have no need to test it as it's in the past.
For the record, I was upgrading from webdevops/php-apache-dev:7.3-alpine, which was also working fine, so the window of error is very narrow.
The text was updated successfully, but these errors were encountered:
jurchiks
changed the title
php-apache-dev:8.1-alpine ReflectionAttribute::newInstance segmentation fault; non-dev image works fine
php-apache-dev:8.1-alpine ReflectionAttribute::newInstance segmentation fault; non-dev images work fine
Feb 14, 2025
docker-compose.yml
:test.php
:The problem:
I tested
webdevops/php:8.1-alpine
, and this same code worked there as expected.I tested
webdevops/php-apache:8.1-alpine
, and this also worked as expected.I tested
webdevops/php-dev:8.1-alpine
, and this failed.I tested
webdevops/php-dev:8.2-alpine
, and this worked.I tested
webdevops/php-dev:8.3-alpine
, and this worked.I tested
php:8.1-fpm-alpine
, and this worked!Clearly, something about the
-dev
version of specifically your flavor of PHP 8.1 fails.Maybe also 8.0, but I have no need to test it as it's in the past.
For the record, I was upgrading from
webdevops/php-apache-dev:7.3-alpine
, which was also working fine, so the window of error is very narrow.The text was updated successfully, but these errors were encountered: