djoos / Symfony-coding-standard

Development repository for the Symfony coding standard
MIT License
401 stars 102 forks source link

Made wrapping {} around @inhericDoc optional #111

Closed Matan closed 6 years ago

Matan commented 6 years ago

I've fixed the regex to either match with wrapping {} or without. Unfortunately I'm unable to get the test running. Using phpunit 7.1.5. Running the ant build yields:

phpunit:
     [exec] PHP Fatal error:  Uncaught Error: Class 'PHP_CodeSniffer\Util\Standards' not found in /home/matan/work/general/Symfony-coding-standard/vendor/squizlabs/php_codesniffer/tests/Standards/AllSniffs.php:117
     [exec] Stack trace:
     [exec] #0 /home/matan/work/general/Symfony-coding-standard/vendor/squizlabs/php_codesniffer/tests/Standards/AllSniffs.php(58): PHP_CodeSniffer\Tests\Standards\AllSniffs::getInstalledStandardDetails()
     [exec] #1 [internal function]: PHP_CodeSniffer\Tests\Standards\AllSniffs::suite('PHP_CodeSniffer...')
     [exec] #2 phar:///usr/local/bin/phpunit/phpunit/Framework/TestSuite.php(607): ReflectionMethod->invoke(NULL, 'PHP_CodeSniffer...')
     [exec] #3 phar:///usr/local/bin/phpunit/phpunit/Util/Configuration.php(1055): PHPUnit\Framework\TestSuite->addTestFile('/home/matan/wor...')
     [exec] #4 phar:///usr/local/bin/phpunit/phpunit/Util/Configuration.php(917): PHPUnit\Util\Configuration->getTestSuite(Object(DOMElement), Array)
     [exec] #5 phar:///usr/local/bin/phpunit/phpunit/TextUI/Command.php(839): PHPUnit\Util\Configuration->getTestSuiteConfiguration('')
     [exec] #6 phar:///usr/loca in /home/matan/work/general/Symfony-coding-standard/vendor/squizlabs/php_codesniffer/tests/Standards/AllSniffs.php on line 117

After targets: composer, vendor and lint successfully executed.

mmoll commented 6 years ago

@Matan please rebase onto the current master branch, then everything is working fine:

[...]
phpunit:
     [exec] PHPUnit 5.5.4 by Sebastian Bergmann and contributors.
     [exec] 
     [exec] .....................                                             21 / 21 (100%)
     [exec] 
     [exec] Time: 164 ms, Memory: 8.00MB
     [exec] 
     [exec] OK (21 tests, 0 assertions)

phpcs:
     [exec] 
     [exec] FILE: ...ding-standard/Symfony/Sniffs/Commenting/FunctionCommentSniff.php
     [exec] ----------------------------------------------------------------------
     [exec] FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
     [exec] ----------------------------------------------------------------------
     [exec]  107 | WARNING | Line exceeds 85 characters; contains 87 characters
     [exec] ----------------------------------------------------------------------
     [exec] 
     [exec] Time: 451ms; Memory: 6Mb
     [exec] 
djoos commented 6 years ago

Thanks for your contribution @Matan!

digibeuk commented 6 years ago

would it be possible to make a release for this merge? I would like to delete our fork which I created for the same purpose as why this PR was created

djoos commented 6 years ago

Done - thanks!

digibeuk commented 6 years ago

nice thanks!