amphp / injector

A recursive dependency injector used to bootstrap and wire together S.O.L.I.D., object-oriented PHP applications.
MIT License
31 stars 7 forks source link

PHP 7 fork #4

Closed szepeviktor closed 3 years ago

szepeviktor commented 3 years ago

Welcome to my fork for people running PHP 7.4!

It will be fun. :)

https://github.com/szepeviktor/injector-php-7

kelunik commented 3 years ago

rdlowrey/auryn should work just fine for PHP 7.4. But I'm also not entirely sure whether 8.0 will really be the minimum requirement.

szepeviktor commented 3 years ago

🤯 Oh no!

This is my contribution: https://github.com/szepeviktor/injector-php-7/commit/dff06c99c83ac412d6be4987d4e198e708df3ff4

szepeviktor commented 3 years ago

1) Amp\Injector\InjectorTest::testMakeInstanceThrowsExceptionOnClassLoadFailure Failed asserting that exception message

'Could not make ClassThatDoesntExist: Class ClassThatDoesntExist does not exist' contains 
'Could not make ClassThatDoesntExist: Class "ClassThatDoesntExist" does not exist'.

Do these quotes come from PHP 8?

kelunik commented 3 years ago

I haven't looked where these come from, yet.

szepeviktor commented 3 years ago

On PHP 8 quoted messages pass, on PHP 7.4 tests fail.

kelunik commented 3 years ago

I guess it's new then.

szepeviktor commented 3 years ago

Published the PHP 7 compatible package. https://packagist.org/packages/szepeviktor/injector-php-7 I encourage you to remove those mixed types and be PHP 7 compatible.