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

Update wikimedia/lessphp to v3 #31579

Merged

Conversation

mrtuvn
Copy link
Contributor

@mrtuvn mrtuvn commented Jan 7, 2021

Description (*)

Update to near stable version. Previously magento still use version 1.8.2
Valid version of this package will be >=3.0.0 <4.0.0
After this patch new version package will be 3.1.0 . From origin repo owner announcements new version support PHP8

This package magento used for server side compile less to css

Origin repo related
https://github.com/wikimedia/less.php/

Related Pull Requests

https://github.com/magento/partners-magento2ee/pull/455

Fixed Issues (if relevant)

  1. Fixes magento/magento2#<issue_number>

Manual testing scenarios (*)

  1. Run static content deploy verify without issue or error
  2. Preview any page in frontend or admin verify no break layout

Questions or comments

CC @krzksz @rogyar Your comments are welcome

Should magento add new feature with official parser less without need install/depend on 3rd-party package ?
Example built-in less/sass parser by php or even we don't use php parser at all. We can use js for compilation

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

Resolved issues:

  1. resolves [Issue] Update wikimedia/lessphp to v3 #31761: Update wikimedia/lessphp to v3

@m2-assistant
Copy link

m2-assistant bot commented Jan 7, 2021

Hi @mrtuvn. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names. Allowed build names are:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests

You can find more information about the builds here

ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review.

For more details, please, review the Magento Contributor Guide documentation.

⚠️ According to the Magento Contribution requirements, all Pull Requests must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@hostep
Copy link
Contributor

hostep commented Jan 11, 2021

Nice!

But why wouldn't we use the constraint ^3.0 instead of ~3.0.0? Isn't the library versioned with semver in mind?
Because of this limited constraint, we're now missing out on release 3.1.0 which should contain some small performance improvements for Magento: wikimedia/less.php#14

Also, in my opinion, try to only update that specific package version in the composer.lock file, all those other package updates you've added are out of scope and not related. I'd run composer update wikimedia/less.php instead of composer update, no?

@mrtuvn
Copy link
Contributor Author

mrtuvn commented Jan 12, 2021

Thanks you for advices

@mrtuvn mrtuvn force-pushed the update-package-wikimedia-lessphp branch 2 times, most recently from 3a282f5 to f1eee01 Compare January 12, 2021 03:01
@ihor-sviziev ihor-sviziev self-assigned this Jan 12, 2021
@ihor-sviziev
Copy link
Contributor

@magento run all tests

@ihor-sviziev ihor-sviziev added Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests Award: bug fix Project: PHP8 labels Jan 12, 2021
@ihor-sviziev
Copy link
Contributor

ihor-sviziev commented Jan 12, 2021

Linked it to the php8 project, as it is going to bring php8 support.
@mrtuvn, could you re-target your PR to the php8-develop branch?

@ihor-sviziev ihor-sviziev mentioned this pull request Jan 12, 2021
4 tasks
@ihor-sviziev ihor-sviziev added the Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. label Jan 12, 2021
@mrtuvn mrtuvn changed the base branch from 2.4-develop to php8-develop January 12, 2021 08:09
@mrtuvn mrtuvn force-pushed the update-package-wikimedia-lessphp branch from f1eee01 to 62aaa3f Compare January 12, 2021 08:13
@mrtuvn
Copy link
Contributor Author

mrtuvn commented Jan 12, 2021

Ok now we re-targeted to php8-develop

@ihor-sviziev
Copy link
Contributor

@magento run all tests

Copy link
Contributor

@ihor-sviziev ihor-sviziev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also update the dependency in the framework's composer.json file?

"wikimedia/less.php": "~1.8.0"

@ihor-sviziev
Copy link
Contributor

@sivaschenko, any thoughts on why static tests are failing?

@mrtuvn
Copy link
Contributor Author

mrtuvn commented Jan 14, 2021

@magento run Static Tests, Integration Tests, Functional Tests EE, Functional Tests CE, Functional Tests B2B

@sivaschenko
Copy link
Member

@ihor-sviziev no thoughts yet, figuring it out

@mrtuvn
Copy link
Contributor Author

mrtuvn commented Jan 18, 2021

Just wonder if we could have built-in php parser less official instead depend on external package?

@hostep
Copy link
Contributor

hostep commented Jan 18, 2021

@mrtuvn: Why not open issues for missing functionality or contribute with fixes to https://github.com/wikimedia/less.php/, that sounds like much less work than building a compiler from scratch again?

But ideally, as mentioned by @DrewML we should get rid of the php version and force users to use the nodejs one even for production deploys.
But then Magento is getting even more complicated (Magento2 started simple with only dependencies on php & mysql. But now we're moving towards dependencies on mysql, php, java, elasticsearch and node.js, not sure if everybody's going to be happy with this...)

@hostep hostep mentioned this pull request Jan 19, 2021
5 tasks
@sivaschenko
Copy link
Member

@magento create issue

@sivaschenko
Copy link
Member

@magento run Static Tests

@sivaschenko
Copy link
Member

@ihor-sviziev @mrtuvn Static tests have been fixed. To achieve this I've updated composer.json file in EE repo and linked a related PR

@sivaschenko
Copy link
Member

@magento run Functional Tests CE,Functional Tests EE,Functional Tests B2B,Integration Tests

1 similar comment
@ihor-sviziev
Copy link
Contributor

@magento run Functional Tests CE,Functional Tests EE,Functional Tests B2B,Integration Tests

@sivaschenko
Copy link
Member

@magento run all tests

@ihor-sviziev
Copy link
Contributor

@magento run Functional Tests B2B, Functional Tests EE

@m2-assistant
Copy link

m2-assistant bot commented Jan 27, 2021

Hi @mrtuvn, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@mrtuvn mrtuvn deleted the update-package-wikimedia-lessphp branch February 5, 2021 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests Award: bug fix Award: category of expertise Progress: ready for testing Project: PHP8 Release Line: 2.4 Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants