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

[2.7.1] Why separate package and failure on composer-require-checker #359

Closed
ruudk opened this issue May 30, 2022 · 1 comment
Closed

[2.7.1] Why separate package and failure on composer-require-checker #359

ruudk opened this issue May 30, 2022 · 1 comment

Comments

@ruudk
Copy link
Contributor

ruudk commented May 30, 2022

Just noticed on the Dependabot bumpi from 2.7.0 to 2.7.1 that a new package was introduced.

First question: When creating a new package, why o why are you doing that for unsupported PHP versions. It supports PHP 5.6 which was EOL 3 years, 4 months ago 🤷

Also, it doesn't follow PHP best practices using PSR-4 namespaces but uses a class map.

This is also why composer-require-checker GitHub actions fails now on that Dependabot bump PR:
Screenshot 2022-05-30 at 09 04 21@2x

@const-cloudinary
Copy link
Contributor

@ruudk , thank you for your feedback!

We have extracted transformations to a separate package since we will release a few more packages that will depend on it soon.

Regarding PHP version... Yeah, that is a good point. Since this is an SDK and many products/integrations/frameworks use it, we don't want to limit them to the old versions of the SDK, or restrict them, and force them to bump their versions, unless it's absolutely nessesary. If you check packagist, there are many libraries who still have minimum PHP version 5.6.

And it's not that we are in desperate need of the latest PHP features. We will do it at some point for sure. And the code perfectly works with all the versions, including 8.1.

PSR-4. Yeah, we have two main goals here: Provide discoverability for users, while keeping the code base well structured.

Not all of our users use smart IDEs, some use simpler editors, that are not always smart enough to automatically import the required classes. Searching for Resize or Overlay, if taking into consideration the actual file path can be pretty challenging and not very intuitive. That's why we put all of the Actions under Cloudinary\Transformation namespace.

From the other side, if we flatten the transformations folder, it would be a disaster to maintain it.

composer-require-checker - to fix it, you'll probably need to add transformations package explicitely to your project.
I completely understand the goal of the tool.
From our side we have limited the major version dependency, so you won't have a surprise one day, when we have some breaking changes in the future.

Hope it answers your questions.

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

No branches or pull requests

2 participants