Skip to content

Add Article Bundle to monorepository #7653

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

Merged

Conversation

alexander-schranz
Copy link
Member

@alexander-schranz alexander-schranz commented Nov 14, 2024

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Fixed tickets fixes #
Related issues/PRs #
License MIT
Documentation PR sulu/sulu-docs#

What's in this PR?

Add Article Bundle to monorepository. This will merge article bundle into sulu/sulu current 3.0 branch (beeb087 (commit hash documented for later ignore article bundle commits in changelog)).

If you have to look at the core changes look in the src directory changes and ignore the packages/article which just contains all files form the article bundle.

Why?

This should make the maintainance of bundles easier.

niklasnatter and others added 30 commits July 23, 2020 11:48
Co-authored-by: Alexander Schoonderwaldt <alexander@weprovide.com>
 Conflicts:
	Resources/config/services.xml
	Tests/Functional/Controller/ArticleControllerTest.php
* Remove default type fallback in compilerpass

* Update sulu/sulu requirement version

Co-authored-by: Niklas Natter <niklas@sulu.io>
…#511)

* Add SegmentViewObject to ExcerptViewObject when indexing article

* Filter articles for current segment key in ArticleDataProvider

* Add segments as a twig variable to the output

* Try fixing tests

* Fix segments for Jackrabbit

* Adjust build for prefer-lowest

Co-authored-by: Daniel Rotter <daniel.rotter@gmail.com>
* Pass localizations array to twig template

* Use absolute url in localizations array
@alexander-schranz alexander-schranz force-pushed the feature/article-merge-into-sulu branch 3 times, most recently from bbf6a28 to 041097c Compare November 14, 2024 15:24
Copy link
Member Author

@alexander-schranz alexander-schranz left a comment

Choose a reason for hiding this comment

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

added a few comments for things which are changed in sulu core for supporting the article bundle inside it, this should make it us better unstandable what was change in Sulu inside this merge request as it contains all article bundle files.

bin/runtests Outdated
Comment on lines 181 to 188
if ($target) {
$finder->in(__DIR__ . '/../src/Sulu/Bundle/' . $target);
$finder->in([__DIR__ . '/../src/Sulu/Bundle/' . $target]);
} else {
$finder->in(__DIR__ . '/../src/Sulu/Bundle/*');
$finder->in([__DIR__ . '/../packages/*', __DIR__ . '/../src/Sulu/Bundle/*']);
Copy link
Member Author

Choose a reason for hiding this comment

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

Make sure it runs also the packages/... tests

bin/runtests Outdated
@@ -191,7 +191,7 @@ function get_bundles($target = null)

function get_test_console_path()
{
$consolePath = __DIR__ . '/../src/Sulu/Bundle/TestBundle/Resources/app/console';
$consolePath = __DIR__ . '/../packages/article/Tests/Application/bin/adminconsole'; // to init the database with complete schema was using currently article bundle
Copy link
Member Author

Choose a reason for hiding this comment

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

this may should be changed in future init the database correctly per bundle instead only once but currently go with this solution

@@ -51,6 +51,7 @@ public function registerBundles(): iterable
new \Massive\Bundle\SearchBundle\MassiveSearchBundle(),

// Sulu
new \Sulu\Messenger\Infrastructure\Symfony\HttpKernel\SuluMessengerBundle(),
Copy link
Member Author

Choose a reason for hiding this comment

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

this also add sulu messenger as a requirement to sulu core

@@ -6,6 +6,7 @@ framework:
enabled: false
mailer:
dsn: 'null://null'
message_bus: false # else messenger component duplicates the message: https://github.com/symfony/symfony/issues/48004#issuecomment-2476617713
Copy link
Member Author

Choose a reason for hiding this comment

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

this seems to be a bug on symfony side which maybe fixed in the future at current state its easy to disable messenger integration in mailer for tests

@alexander-schranz alexander-schranz force-pushed the feature/article-merge-into-sulu branch 3 times, most recently from 0b64382 to 68382f4 Compare November 14, 2024 16:22
Copy link
Member Author

@alexander-schranz alexander-schranz left a comment

Choose a reason for hiding this comment

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

COMPOSER_ROOT_VERSION hack need to be removed when sulu/SuluContentBundle#271 is merged or content bundle is sulu/sulu

@@ -129,6 +129,7 @@ jobs:
SULU_ADMIN_EMAIL:
PHPCR_TRANSPORT: ${{ matrix.phpcr-transport }}
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMPOSER_ROOT_VERSION: dev-feature/content-resolver # todo remove when content bundle is merged into sulu/sulu
Copy link
Member Author

Choose a reason for hiding this comment

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

this should be reverted when sulu/SuluContentBundle#271 merged or content bundle is sulu/sulu

@@ -263,6 +264,7 @@ jobs:
MAILER_URL: null://localhost
SULU_ADMIN_EMAIL:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMPOSER_ROOT_VERSION: dev-feature/content-resolver # todo remove when content bundle is merged into sulu/sulu
Copy link
Member Author

Choose a reason for hiding this comment

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

this should be reverted when sulu/SuluContentBundle#271 merged or content bundle is sulu/sulu

@alexander-schranz alexander-schranz force-pushed the feature/article-merge-into-sulu branch 2 times, most recently from bfa897d to 0be40c3 Compare November 14, 2024 16:29
@@ -27,6 +27,7 @@ public static function getSuluContext(): string
public function testFirstRequestIsACacheMiss()
{
$this->purgeDatabase();
$this->initPhpcr();
Copy link
Member Author

Choose a reason for hiding this comment

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

messenger makes this test fails. interesting this does fix it but not sure why it works before

@alexander-schranz
Copy link
Member Author

highest test requires a fix on coduo repository side: coduo/php-matcher#496

lowest test requires us to upgrade to Min Symfony 6.1 (so 6.4) /cc @chirimoya @wachterjohannes @Prokyonn

@alexander-schranz alexander-schranz marked this pull request as draft November 14, 2024 18:21
@alexander-schranz alexander-schranz added the Feature New functionality not yet included in Sulu label Nov 14, 2024
@alexander-schranz alexander-schranz force-pushed the feature/article-merge-into-sulu branch from fda563f to 7f36107 Compare November 15, 2024 10:09
@alexander-schranz alexander-schranz force-pushed the feature/article-merge-into-sulu branch from 7f36107 to 91dd32b Compare November 15, 2024 10:13
@alexander-schranz
Copy link
Member Author

There a few changes I need todo to make the CI green. It would be a little bit to hidden to make that changes inside this big merge of article bundle into the Sulu core So I would merge this part and move forward with smaller pull request to fix the CI. /cc @Prokyonn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New functionality not yet included in Sulu
Projects
None yet
Development

Successfully merging this pull request may close these issues.