Open Techmind opened 10 years ago
also works:
echo '<?php $x = b::instance();' > 1.error.php && spatch -e 's/core\a;/core\a+1;/' 1.error.php
echo '<?php $x = b::instance();' > 1.error.php && spatch -e 's/core\A;/core\A+1;/' 1.error.php
echo '<?php $x = a\b::instance();' > 1.error.php && spatch -e 's/core\A;/core\A+1;/' 1.error.php
echo '<?php $x = A\b::instance();' > 1.error.php && spatch -e 's/A/core\A+1/' 1.error.php
echo '<?php $x = A\b::instance()->doY();' > 1.error.php && spatch -e 's/A = SClass::get(B, C);/A = \name\Class::instance()->get(B, C);/' 1.error.php
echo '<?php $x = A\b::instance(); $x->doY();' > 1.error.php && spatch -e 's/A = SClass::get(B, C);/A = \name\Class::instance()->get(B, C);/' 1.error.php
Fatal error: exception Astphp.TodoNamespace()
+1 . I've met this problem on Symfony2 project, which turn down benefits of scheck
.
Does anybody know when this will be fixed ? Any plans on this ?
what is the bug in scheck related to namespace? Can you give me a file so I can try to reproduce the problem?
@aryx Here we go (as minimum as I can make it to fail). File test.php
:
<?php namespace A;
Run:
$ ./scheck /Users/Bob/Sites/symfony2_pfff/app/test.php
Output:
using /Users/Bob/Sites/symfony2_pfff for php_root
1 / 1PB with /Users/Bob/Sites/symfony2_pfff/app/test.php, exn = Ast_php.TodoNamespace(_)
Came here after installing scheck to report this bug. PSR2 (or is it PSR1) warns when namespaces aren't used, but scheck fails if they are. Catch 22.
Thank you for reporting this issue and appreciate your patience. We've notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed.
test case:
echo '<?php $x = a\b::instance();' > 1.error.php && spatch -e 's/core\A/core\A+1/' 1.error.php
output: Fatal error: exception Astphp.TodoNamespace()
used commit - pfff@6733eb3aac345cb601586d117085e2edbea96027