Skip to content

Adjust live-component CI to use twig-component release #200

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ jobs:
- name: LiveComponent
run: |
cd src/LiveComponent
php ../../.github/build-packages.php
Copy link
Member Author

Choose a reason for hiding this comment

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

We definitely want this removed for low-deps but what about high?

Copy link
Member

Choose a reason for hiding this comment

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

Hmm. Removing this wouldn't work for high deps if we added a new feature to Twig & Live components at the same time, which use each other. In that case, the Live component would install the stable Twig Component, which wouldn't include the still-unreleased new Twig component feature.

The same could technically be true for low deps... but it's likely much more less common and this would work fine. The edge-case I'm talking about is (same as above) if we added a new feature to Twig + Live components that rely on each other. Then, assuming the current stable release is 2.0, we change LiveComponent to rely on TwigComponent 2.1. That'll fail, because 2.1 isn't released, etc, etc.

This is why the complex solution in symfony/symfony exists. WDYT?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, so definitely run this script for high deps.

Not sure how to handle your second point. This does seem valid - some of the things we discussed recently (embedded components) would do this.

Copy link
Member

Choose a reason for hiding this comment

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

Yea, the "complex solution" in symfony/symfony looks... complex to me 🙃. But i think it's also the only true solution. Consider #248: you remembered to bump the composer.json file there. But if you had forgotten, the tests would still pass. The "real" solution is to, when testing live-component, to download its real dependencies... except if the version specified in composer.json is the next, unreleased version (e.g. like 2.1, which you've correctly specified). In that case, I think symfony/symfony basically "patches" in the twig-component code from the PR as version "2.1".

composer update --prefer-lowest --prefer-dist --no-interaction --no-ansi --no-progress
php vendor/bin/simple-phpunit

Expand Down