Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure PHPStan 0.12 support #91

Closed
mglaman opened this issue Dec 4, 2019 · 4 comments 路 Fixed by #92
Closed

Ensure PHPStan 0.12 support #91

mglaman opened this issue Dec 4, 2019 · 4 comments 路 Fixed by #92

Comments

@mglaman
Copy link
Owner

mglaman commented Dec 4, 2019

馃槵 let's see if PHPStan 0.12 works with this extension.

@mglaman mglaman mentioned this issue Dec 4, 2019
4 tasks
@mglaman
Copy link
Owner Author

mglaman commented Dec 4, 2019

This won't work.

            if (!\is_a($class, \_HumbugBox3be60b26ad9d\Nette\DI\CompilerExtension::class, \true)) {
                throw new \_HumbugBox3be60b26ad9d\Nette\DI\InvalidConfigurationException("Extension should be Nette\\DI\\CompilerExtension, '{$class}' given.");
            }

This extension has to be completely rewritten to not use any components of nette/di to ensure Drupal is autoloaded.

@mglaman
Copy link
Owner Author

mglaman commented Dec 4, 2019

We can no longer use this:

extensions:
	drupal: PHPStan\DependencyInjection\DrupalExtension

This was a known weak point and I tried resolving in #71.

I made this comment

	# @todo this must persist in a DI extension due unexpanded relative path.
	#autoload_files:
	#	- drupal-autoloader.php

Looks like fixing that is a hard requirement, now.

@mglaman
Copy link
Owner Author

mglaman commented Dec 4, 2019

Dependencies from Nette\ and Symfony\ namespaces can no longer be used directly as they are prefixed in the PHAR with a random namespace. If you have a valid use-case, open an issue and we'll figure some interface to use it through.

馃檭 right in the release notes https://github.com/phpstan/phpstan/releases/tag/0.12.0

@goba
Copy link
Sponsor Contributor

goba commented Dec 6, 2019

Well, you do have a valid use-case ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants