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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean class and function files as per PSR-4 #98

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

szepeviktor
Copy link

Closes #97

@antecedent What do you think?

BTW Please consider following PSR-12 coding style.

@szepeviktor
Copy link
Author

szepeviktor commented Nov 24, 2019

I'm stuck with the following error. Please help me.

PHP Warning:  Composer\Autoload\includeFile(/home/viktor/tmp/patchwork/src/Config/State.php): 
failed to open stream: "Patchwork\CodeManipulation\Stream::stream_open" call failed 
in /home/viktor/tmp/patchwork/vendor/composer/ClassLoader.php on line 444

PHP Warning:  Composer\Autoload\includeFile(): 
Failed opening '/home/viktor/tmp/patchwork/patchwork-composer/composer/../../src/Config/State.php' for inclusion (include_path='.:/usr/share/php') 
in /home/viktor/tmp/patchwork/vendor/composer/ClassLoader.php on line 444

PHP Fatal error:  Uncaught Error: 
Class 'Patchwork\Config\State' not found 
in /home/viktor/tmp/patchwork/src/Config/functions.php:88

Stack trace:
#0 /home/viktor/tmp/patchwork/src/CodeManipulation/functions.php(130): Patchwork\Config\isBlacklisted('/home/viktor/tm...')
#1 /home/viktor/tmp/patchwork/src/CodeManipulation/Stream.php(45): Patchwork\CodeManipulation\shouldTransform('/home/viktor/tm...')
#2 /home/viktor/tmp/patchwork/vendor/composer/ClassLoader.php(444): Patchwork\CodeManipulation\Stream->stream_open('/home/viktor/tm...', 'rb', 16512, NULL)
#3 /home/viktor/tmp/patchwork/vendor/composer/ClassLoader.php(444): include()
#4 /home/viktor/tmp/patchwork/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile('/home/viktor/tm...')
#5 [internal function]: Composer\Autoload\ClassLoader->loadClass('Patchwork\\Confi...')
#6 /home/viktor/tmp/patchwork/src/Config/functions.php(152): spl_autoload_call('Patchwork\\Confi...')
#7 /home/viktor/tmp/patchwork/src/CodeManipulation/Actions/RedefinitionOfInternals/functions.php in /home/viktor/tmp/patchwork/src/Config/functions.php on line 88

@szepeviktor
Copy link
Author

szepeviktor commented Nov 24, 2019

I think Patchwork patches Composer :)
Could we exclude Composer and our classes while patching?

@szepeviktor
Copy link
Author

Done.

@szepeviktor
Copy link
Author

szepeviktor commented Nov 24, 2019

@antecedent Could you help fix the remaining failing test?

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 this pull request may close these issues.

Composer-izing
1 participant