assetic icon indicating copy to clipboard operation
assetic copied to clipboard

Update symfony/process to 4.X

Open james-nesbitt opened this issue 6 years ago • 19 comments

Hi There. I am using assetic in a Laravel project.

A recent release 5.6 update in Laravel has updated it's symfony/process dependency to ~4.0 (https://github.com/laravel/framework/blob/5.6/composer.json#L36), which is incompatible with the versioning used in Assetic. The release upgrade notes are here: https://laravel.com/docs/5.6/upgrade.

I would like to propose updating the symfony/process dependency in assetic to allow for 4.0. I believe that this could be done without requiring 4.0, but allowing for it.

I have done some testing using assetic with symfony/process 4.0, without issue, but clearly this is a community decisions, and requires community assessment.

james-nesbitt avatar Jun 07 '18 12:06 james-nesbitt

well, not all filters are using the process component. So the fact that it worked in your testing might not mean it works fine. And I'm rather sure that's not the case, as most places using the Process component are using the ProcessBuilder, which does not exist anymore in 4.0

stof avatar Jun 07 '18 12:06 stof

@stof that does sound like a risk. Do you think there is any risk to assetic if large frameworks like Laravel are moving to 4.0.

Does Travis run enough testing to catch any such issues?

james-nesbitt avatar Jun 07 '18 12:06 james-nesbitt

@stof, I will ask my colleague to submit a PR with just the symfony/process change, just to get some more opinions. It is clear for me that this is not a change to take lightly, and I will not be pushing for a fast merge or anything.

[edit: I discovered that there is already a PR for this change]

james-nesbitt avatar Jun 07 '18 12:06 james-nesbitt

Does Travis run enough testing to catch any such issues?

I think it does (assuming one of the job would select Symfony 4)

stof avatar Jun 07 '18 13:06 stof

just saw this: https://github.com/kriswallsmith/assetic/pull/880

james-nesbitt avatar Jun 07 '18 13:06 james-nesbitt

@stof What is your ambition with #880? Wil l you try to get it in as a version update, if the PR gets up to snuff?

james-nesbitt avatar Jun 07 '18 17:06 james-nesbitt

Hello.

I am using assetic for Jpeg optimisation in a Symfony 4.1.3 project as part of a migration from Silex, and just came across this issue with the following error:

User Deprecated: The Symfony\Component\Process\ProcessBuilder class is deprecated since Symfony 3.4 and will be removed in 4.0. Use the Process class instead. {"exception":"[object] (ErrorException(code: 0): User Deprecated: The Symfony\\Component\\Process\\ProcessBuilder class is deprecated since Symfony 3.4 and will be removed in 4.0. Use the Process class instead.

Are there any plans to make this package compatible with symfony/process ^4.0?

P.S. I have noticed https://github.com/kriswallsmith/assetic/pull/880 but the discussion appears to have gone cold.

boxedcode avatar Aug 11 '18 11:08 boxedcode

are there any alternatives out there, since this project seems to be undermaintained.

sweiguny avatar Nov 22 '18 16:11 sweiguny

@sweiguny I have switched to: https://github.com/spatie/image-optimizer Have a look and see if it meets your needs.

kabudu avatar Dec 02 '18 19:12 kabudu

@kabudu thank you for the hint, but this project doesn't provide JS/CSS minifyer?

sweiguny avatar Dec 02 '18 20:12 sweiguny

@sweiguny Yup, it doesn't. But I was using the image optimisation component of this library, hence why that other one works for me. If you're looking for JS/CSS minification with a PHP library, I don't have any suggestions at the moment.

kabudu avatar Dec 02 '18 21:12 kabudu

@kabudu thanks, anyway. maybe i need this sometime. your suggestion probably helps others who were using assetic for the same purpose as you.

sweiguny avatar Dec 02 '18 21:12 sweiguny

This has been implemented in the 2.0 branch of assetic-php/assetic. Until we tag 2.0, you can pull it in by using "assetic/framework": "dev-2.0/dev" in your composer.json files.

LukeTowers avatar Feb 05 '20 17:02 LukeTowers

This also blocks updating to "doctrine/doctrine-orm-module": "~3.0.*" ......

FabianKoestring avatar May 25 '20 10:05 FabianKoestring

@FabianKoestring did you try out the assetic-php fork?

LukeTowers avatar May 25 '20 15:05 LukeTowers

@FabianKoestring did you try out the assetic-php fork?

No I did not. Your comment was from February and there was no 2.0 tag yet. It seemed to me that this repository is no longer being updated.

FabianKoestring avatar May 26 '20 05:05 FabianKoestring

@FabianKoestring been busy with @octobercms, just waiting on testing from other people.

LukeTowers avatar May 26 '20 06:05 LukeTowers

I am having this same problem (and a heck of a time just tracking it down to this package)

PoetikDragon avatar Jun 08 '20 06:06 PoetikDragon

@PoetikDragon @FabianKoestring We've just released the 2.0 release that addresses a number of existing issues and dependency updates, see https://github.com/assetic-php/assetic/releases/tag/v2.0.0 for more information! Please try it out and let us know if you have any issues!

LukeTowers avatar Oct 11 '20 07:10 LukeTowers