I have found a problem in the symfony package and I have a very little fix I want to implement. How to change it with my own code and implement it globally in my laravel.
Asked
Active
Viewed 265 times
-1
-
Why not report this as a bug and get it fixed in the original repository? If you already have a fix at hand, simply submit a pull request – Nico Haase Apr 15 '22 at 15:05
-
That's because I'm not sure. The problem lies when I use another package and I trace it to the symfony/process. I need a quick fix first so, yes until I'm sure it's a bug, I will do a quick fix first – Fendy Harianto Apr 18 '22 at 04:36
1 Answers
0
You can fork the package make the changes, and have the composer package point to your version instead of the primary location.
Here is a quick recap of how to do it:
// for the require
// assuming you forked the repo and made the changes on master branch
require: {
"symfony/process": "dev-master"
}
// if you don't have this key simply add it:
// replace: YOURNAME with your name (this assumes you are using github, any git repo URL will work)
"repositories": [
{
"type": "vcs",
"url": "https://github.com/YOURNAME/process"
}
]
Then simply run: composer update
Here is a longer guide and explanation:
https://medium.com/swlh/using-your-own-forks-with-composer-699358db05d9
Might be worth doing a pull request to the maintainer of the package as well, this way you can simply remove your forked package and simply update when the maintainer updates their version.

josezenem
- 300
- 1
- 5
-
have you ever tried it on laravel? I try it, but with no success because there is a lot of dependencies locked to that version – Fendy Harianto Apr 14 '22 at 07:16
-
@FendyHarianto yep, as long as the project uses composer the framework is irrelevant. However if composer asks you for a specific version, simply check the version you are currently using in composer.json or composer.lock and use the `as` `require: { "symfony/process": "dev-master as 5.3.0" }` – josezenem Apr 14 '22 at 13:15
-