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

fixed including of paths with scheme in config loader #153

Merged
merged 1 commit into from Aug 31, 2017

Conversation

@fprochazka
Copy link
Contributor

fprochazka commented May 5, 2017

  • 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

This comment has been minimized.

Copy link
Contributor

JanTvrdik commented May 7, 2017

@fprochazka Could you add test?

@fprochazka

This comment has been minimized.

Copy link
Contributor Author

fprochazka commented May 7, 2017

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?

@@ -48,7 +48,7 @@ public function load(string $file): array
if (isset($data[self::INCLUDES_KEY])) {
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)) {

This comment has been minimized.

Copy link
@Majkl578

Majkl578 May 7, 2017

Contributor

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

@dg dg force-pushed the nette:master branch 2 times, most recently from 539908c to 9e31491 Jul 11, 2017
@dg dg force-pushed the nette:master branch 3 times, most recently from b1bf33b to abfbe74 Jul 21, 2017
@dg dg force-pushed the nette:master branch 3 times, most recently from f5d91ca to 29b3a56 Aug 30, 2017
@dg dg merged commit d4a1f67 into nette:master Aug 31, 2017
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 93.857%
Details
dg added a commit that referenced this pull request Aug 31, 2017
dg added a commit that referenced this pull request Aug 31, 2017
dg added a commit that referenced this pull request Aug 31, 2017
@fprochazka fprochazka deleted the fprochazka:fp-loader-include-scheme branch Aug 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.