Skip to content
This repository was archived by the owner on Mar 9, 2024. It is now read-only.

Split rule into ruleparts to prevent long glob patterns (failing unde… #3

Closed
wants to merge 1 commit into from
Closed

Split rule into ruleparts to prevent long glob patterns (failing unde… #3

wants to merge 1 commit into from

Conversation

mmodler
Copy link
Contributor

@mmodler mmodler commented Jun 17, 2015

…r windows)

Fix for #1

@barryvdh
Copy link
Owner

Hmm, what about splitting the globs up into an array instead? So instead of {$docs} {$tests} MoreTests we get: [$docs, $tests, 'MoreTests']

@mmodler
Copy link
Contributor Author

mmodler commented Jun 17, 2015

Do you talk about changing the rules format?

@barryvdh
Copy link
Owner

Yes but just to allow both array or a string.

@mmodler
Copy link
Contributor Author

mmodler commented Jun 17, 2015

Hm, then i would change everything to array syntax?

@mmodler
Copy link
Contributor Author

mmodler commented Jun 17, 2015

OT: Is there a commandline composer command to force plugin execution? This would make testing much more comfortable :)

@mmodler
Copy link
Contributor Author

mmodler commented Jun 18, 2015

How to go on with this? I really like to use the plugin ;)

barryvdh added a commit that referenced this pull request Jun 18, 2015
@barryvdh
Copy link
Owner

I meant something like this: 3bf4b1b

So now we still have the 'fast' glob brace thing, but just split into smaller parts.

Does this work for you?

@mmodler
Copy link
Contributor Author

mmodler commented Jun 18, 2015

So i looked over it again: It would be easy to handle rules in array format. But if you look the config file, the combination of default rules and custom rules in array format can only be done with array_merge. Do you think this would be preferable over the string format?

@barryvdh
Copy link
Owner

Not sure, what do you mean? What do you need to merge?

@mmodler
Copy link
Contributor Author

mmodler commented Jun 18, 2015

I misunderstood you new config format. As i see it now, i would prefer it because it skips the braced syntax {$var}. So the new config format looks good for me.

Globbing:
Its not bullet proof as long as you combine multiple patterns, because the string consists of full path to package + patterns. So it could easily overcome the 260 chars limit:

D:/mydevworkspace/repositories/mycoolproject/vendor/longervender/longercoolpackagename/{ longer set of custom package patterns}

The only secure way is to spilt into single globs, because a single glob pattern would never become longer as the target file url (windows / the os) can handle nativly.

@mmodler
Copy link
Contributor Author

mmodler commented Jun 18, 2015

If you agree with me, i can do another pr for array config + single globs if you like?

@barryvdh
Copy link
Owner

Hmm, yeah it could only be max 120 chars or so (still a lot longer then your example), but not sure what the speed impact is.

But okay, make it single globs, without the brace.

@mmodler
Copy link
Contributor Author

mmodler commented Jun 18, 2015

Running composer directly under Win globbing the win filesystem, i can't see any delay. I will do the pr now.

@mmodler
Copy link
Contributor Author

mmodler commented Jun 18, 2015

New PR #6

@mmodler mmodler closed this Jun 18, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants