Skip to content

Conversation

@fprochazka
Copy link
Contributor

  • bug fix? yes
  • new feature? no
  • BC break? no

Including a config in the following way doesn't work

includes:
    - phar://phpstan.phar/vendor/phpstan/phpstan-doctrine/extension.neon

fprochazka added a commit to fprochazka/phpstan-compiler that referenced this pull request May 5, 2017
@JanTvrdik
Copy link
Contributor

@fprochazka Could you add test?

@fprochazka
Copy link
Contributor Author

Probably yes, but I'm not sure how to test it. Adding a phar would be a lot of work. Maybe file:// would be enough?

Validators::assert($data[self::INCLUDES_KEY], 'list', "section 'includes' in file '$file'");
foreach ($data[self::INCLUDES_KEY] as $include) {
if (!preg_match('#([a-z]:)?[/\\\\]#Ai', $include)) {
if (!preg_match('#([a-z]+:)?[/\\\\]#Ai', $include)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will also allow i.e. phar:\\ which is not correct.

@dg dg force-pushed the master branch 2 times, most recently from 539908c to 9e31491 Compare July 12, 2017 14:23
@dg dg force-pushed the master branch 3 times, most recently from b1bf33b to abfbe74 Compare July 21, 2017 19:29
@dg dg force-pushed the master branch 3 times, most recently from f5d91ca to 29b3a56 Compare August 31, 2017 22:38
@dg dg merged commit d4a1f67 into nette:master Aug 31, 2017
@fprochazka fprochazka deleted the fp-loader-include-scheme branch August 31, 2017 23:15
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.

4 participants