Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 6 additions & 2 deletions resources/platformsh/ibexa-commerce/5.0/.platform.app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,17 @@ hooks:
echo "TIP: If you need to authenticate against Github/Gitlab/updates.ibexa.co, use COMPOSER_AUTH env variable"
echo "See: https://docs.platform.sh/guides/general/composer-auth.html#set-the-envcomposer_auth-project-variable"
fi

composer install --no-dev --prefer-dist --no-progress --no-interaction --optimize-autoloader

curl -fs https://get.symfony.com/cloud/configurator | bash

NODE_VERSION=v18.19.0 symfony-build

# Deploy hook, access to services & done once (per cluster, not per node), only mounts are writable at this point
# Note: Http traffic is paused while this is running, so for prod code this should finish as fast as possible, < 30s
deploy: |
set -e

symfony-deploy

if [ ! -f public/var/.platform.installed ]; then
# Configure ElasticSearch mappings
Expand Down
8 changes: 6 additions & 2 deletions resources/platformsh/ibexa-experience/5.0/.platform.app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,17 @@ hooks:
echo "TIP: If you need to authenticate against Github/Gitlab/updates.ibexa.co, use COMPOSER_AUTH env variable"
echo "See: https://docs.platform.sh/guides/general/composer-auth.html#set-the-envcomposer_auth-project-variable"
fi

composer install --no-dev --prefer-dist --no-progress --no-interaction --optimize-autoloader

curl -fs https://get.symfony.com/cloud/configurator | bash

NODE_VERSION=v18.19.0 symfony-build

# Deploy hook, access to services & done once (per cluster, not per node), only mounts are writable at this point
# Note: Http traffic is paused while this is running, so for prod code this should finish as fast as possible, < 30s
deploy: |
set -e

symfony-deploy

if [ ! -f public/var/.platform.installed ]; then
# Configure ElasticSearch mappings
Expand Down
8 changes: 6 additions & 2 deletions resources/platformsh/ibexa-headless/5.0/.platform.app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,17 @@ hooks:
echo "TIP: If you need to authenticate against Github/Gitlab/updates.ibexa.co, use COMPOSER_AUTH env variable"
echo "See: https://docs.platform.sh/guides/general/composer-auth.html#set-the-envcomposer_auth-project-variable"
fi

composer install --no-dev --prefer-dist --no-progress --no-interaction --optimize-autoloader

curl -fs https://get.symfony.com/cloud/configurator | bash

NODE_VERSION=v18.19.0 symfony-build

# Deploy hook, access to services & done once (per cluster, not per node), only mounts are writable at this point
# Note: Http traffic is paused while this is running, so for prod code this should finish as fast as possible, < 30s
deploy: |
set -e

symfony-deploy

if [ ! -f public/var/.platform.installed ]; then
# Configure ElasticSearch mappings
Expand Down
8 changes: 6 additions & 2 deletions resources/platformsh/ibexa-oss/5.0/.platform.app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,17 @@ hooks:
echo "TIP: If you need to authenticate against Github/Gitlab/updates.ibexa.co, use COMPOSER_AUTH env variable"
echo "See: https://docs.platform.sh/guides/general/composer-auth.html#set-the-envcomposer_auth-project-variable"
fi

composer install --no-dev --prefer-dist --no-progress --no-interaction --optimize-autoloader

curl -fs https://get.symfony.com/cloud/configurator | bash

NODE_VERSION=v18.19.0 symfony-build

# Deploy hook, access to services & done once (per cluster, not per node), only mounts are writable at this point
# Note: Http traffic is paused while this is running, so for prod code this should finish as fast as possible, < 30s
deploy: |
set -e

symfony-deploy

if [ ! -f public/var/.platform.installed ]; then
# To workaround issues with p.sh Varnish we clear container cache & temporary set Symfony Proxy
Expand Down
15 changes: 14 additions & 1 deletion src/lib/Command/IbexaSetupCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,20 @@ static function (SplFileInfo $dir): string {
)
);

$productPackage = InstalledVersions::getRawData()['versions'][$product];
$allRawDataSets = InstalledVersions::getAllRawData();
$productPackage = null;

foreach ($allRawDataSets as $rawData) {
if (isset($rawData['versions'][$product])) {
$productPackage = $rawData['versions'][$product];
break;
}
}

if ($productPackage === null) {
throw new RuntimeException(sprintf('Could not find product "%s" in installed versions.', $product));
}

Copy link
Member

Choose a reason for hiding this comment

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

What is the reason behind this change ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://github.com/composer/composer/blob/main/src/Composer/InstalledVersions.php#L269
Due to this, when script called InstalledVersions::getRawData()['versions'][$product] I got 'no such key in array' error

$aliases = $productPackage['aliases'] ?? [];
$productVersion = $productPackage['version'] ?? '';

Expand Down
Loading