diff --git a/api/composer.json b/api/composer.json index 3a6afe56..35de5120 100755 --- a/api/composer.json +++ b/api/composer.json @@ -2,7 +2,6 @@ "require": { "carlcs/craft-assetmetadata": "^4.0", "castiron/next-builds": "^1.0", - "craftcms/aws-s3": "2.0.3", "craftcms/cms": "4.5.4", "craftcms/contact-form": "3.0.1", "craftcms/contact-form-honeypot": "^2.0.0", diff --git a/api/composer.lock b/api/composer.lock index ff6fcdc9..6c8334fc 100644 --- a/api/composer.lock +++ b/api/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "26bd6b56db3003673680ee2b394febbd", + "content-hash": "b48eb8e1e4683971433e48b531180f7c", "packages": [ { "name": "abraham/twitteroauth", @@ -50,150 +50,6 @@ ], "time": "2022-01-19T01:10:09+00:00" }, - { - "name": "aws/aws-crt-php", - "version": "v1.0.4", - "source": { - "type": "git", - "url": "https://github.com/awslabs/aws-crt-php.git", - "reference": "f5c64ee7c5fce196e2519b3d9b7138649efe032d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/awslabs/aws-crt-php/zipball/f5c64ee7c5fce196e2519b3d9b7138649efe032d", - "reference": "f5c64ee7c5fce196e2519b3d9b7138649efe032d", - "shasum": "" - }, - "require": { - "php": ">=5.5" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35|^5.6.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "AWS SDK Common Runtime Team", - "email": "aws-sdk-common-runtime@amazon.com" - } - ], - "description": "AWS Common Runtime for PHP", - "homepage": "http://aws.amazon.com/sdkforphp", - "keywords": [ - "amazon", - "aws", - "crt", - "sdk" - ], - "support": { - "issues": "https://github.com/awslabs/aws-crt-php/issues", - "source": "https://github.com/awslabs/aws-crt-php/tree/v1.0.4" - }, - "time": "2023-01-31T23:08:25+00:00" - }, - { - "name": "aws/aws-sdk-php", - "version": "3.261.15", - "source": { - "type": "git", - "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "7d17f3187a4d5bebc41ca5d363570ed632b698c0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/7d17f3187a4d5bebc41ca5d363570ed632b698c0", - "reference": "7d17f3187a4d5bebc41ca5d363570ed632b698c0", - "shasum": "" - }, - "require": { - "aws/aws-crt-php": "^1.0.4", - "ext-json": "*", - "ext-pcre": "*", - "ext-simplexml": "*", - "guzzlehttp/guzzle": "^6.5.8 || ^7.4.5", - "guzzlehttp/promises": "^1.4.0", - "guzzlehttp/psr7": "^1.8.5 || ^2.3", - "mtdowling/jmespath.php": "^2.6", - "php": ">=5.5" - }, - "require-dev": { - "andrewsville/php-token-reflection": "^1.4", - "aws/aws-php-sns-message-validator": "~1.0", - "behat/behat": "~3.0", - "composer/composer": "^1.10.22", - "dms/phpunit-arraysubset-asserts": "^0.4.0", - "doctrine/cache": "~1.4", - "ext-dom": "*", - "ext-openssl": "*", - "ext-pcntl": "*", - "ext-sockets": "*", - "nette/neon": "^2.3", - "paragonie/random_compat": ">= 2", - "phpunit/phpunit": "^4.8.35 || ^5.6.3 || ^9.5", - "psr/cache": "^1.0", - "psr/simple-cache": "^1.0", - "sebastian/comparator": "^1.2.3 || ^4.0", - "yoast/phpunit-polyfills": "^1.0" - }, - "suggest": { - "aws/aws-php-sns-message-validator": "To validate incoming SNS notifications", - "doctrine/cache": "To use the DoctrineCacheAdapter", - "ext-curl": "To send requests using cURL", - "ext-openssl": "Allows working with CloudFront private distributions and verifying received SNS messages", - "ext-sockets": "To use client-side monitoring" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "files": [ - "src/functions.php" - ], - "psr-4": { - "Aws\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Amazon Web Services", - "homepage": "http://aws.amazon.com" - } - ], - "description": "AWS SDK for PHP - Use Amazon Web Services in your PHP project", - "homepage": "http://aws.amazon.com/sdkforphp", - "keywords": [ - "amazon", - "aws", - "cloud", - "dynamodb", - "ec2", - "glacier", - "s3", - "sdk" - ], - "support": { - "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", - "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.261.15" - }, - "time": "2023-03-20T18:19:46+00:00" - }, { "name": "carlcs/craft-assetmetadata", "version": "4.0.0", @@ -1060,70 +916,6 @@ ], "time": "2022-02-25T21:32:43+00:00" }, - { - "name": "craftcms/aws-s3", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/craftcms/aws-s3.git", - "reference": "a04ee659490d53da879e302e660ba3807532a926" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/craftcms/aws-s3/zipball/a04ee659490d53da879e302e660ba3807532a926", - "reference": "a04ee659490d53da879e302e660ba3807532a926", - "shasum": "" - }, - "require": { - "craftcms/cms": "^4.0.0-beta.1", - "craftcms/flysystem": "^1.0.0-beta.2", - "league/flysystem-aws-s3-v3": "^3.0.0", - "php": "^8.0.2" - }, - "require-dev": { - "craftcms/ecs": "dev-main", - "craftcms/phpstan": "dev-main", - "craftcms/rector": "dev-main" - }, - "type": "craft-plugin", - "extra": { - "name": "Amazon S3", - "handle": "aws-s3", - "documentationUrl": "https://github.com/craftcms/aws-s3/blob/master/README.md" - }, - "autoload": { - "psr-4": { - "craft\\awss3\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Pixel & Tonic", - "homepage": "https://pixelandtonic.com/" - } - ], - "description": "Amazon S3 integration for Craft CMS", - "keywords": [ - "Flysystem", - "aws", - "cms", - "craftcms", - "s3", - "yii2" - ], - "support": { - "docs": "https://github.com/craftcms/aws-s3/blob/master/README.md", - "email": "support@craftcms.com", - "issues": "https://github.com/craftcms/aws-s3/issues?state=open", - "rss": "https://github.com/craftcms/aws-s3/commits/master.atom", - "source": "https://github.com/craftcms/aws-s3" - }, - "time": "2023-03-16T22:49:16+00:00" - }, { "name": "craftcms/cms", "version": "4.5.4", @@ -3626,76 +3418,6 @@ ], "time": "2023-02-18T15:32:41+00:00" }, - { - "name": "league/flysystem-aws-s3-v3", - "version": "3.12.2", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/flysystem-aws-s3-v3.git", - "reference": "645e14e4a80bd2da8b01e57388e7296a695a80c2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem-aws-s3-v3/zipball/645e14e4a80bd2da8b01e57388e7296a695a80c2", - "reference": "645e14e4a80bd2da8b01e57388e7296a695a80c2", - "shasum": "" - }, - "require": { - "aws/aws-sdk-php": "^3.220.0", - "league/flysystem": "^3.10.0", - "league/mime-type-detection": "^1.0.0", - "php": "^8.0.2" - }, - "conflict": { - "guzzlehttp/guzzle": "<7.0", - "guzzlehttp/ringphp": "<1.1.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "League\\Flysystem\\AwsS3V3\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Frank de Jonge", - "email": "info@frankdejonge.nl" - } - ], - "description": "AWS S3 filesystem adapter for Flysystem.", - "keywords": [ - "Flysystem", - "aws", - "file", - "files", - "filesystem", - "s3", - "storage" - ], - "support": { - "issues": "https://github.com/thephpleague/flysystem-aws-s3-v3/issues", - "source": "https://github.com/thephpleague/flysystem-aws-s3-v3/tree/3.12.2" - }, - "funding": [ - { - "url": "https://ecologi.com/frankdejonge", - "type": "custom" - }, - { - "url": "https://github.com/frankdejonge", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/league/flysystem", - "type": "tidelift" - } - ], - "time": "2023-01-17T14:15:08+00:00" - }, { "name": "league/flysystem-google-cloud-storage", "version": "3.12.3", @@ -4270,67 +3992,6 @@ ], "time": "2023-02-06T13:44:46+00:00" }, - { - "name": "mtdowling/jmespath.php", - "version": "2.6.1", - "source": { - "type": "git", - "url": "https://github.com/jmespath/jmespath.php.git", - "reference": "9b87907a81b87bc76d19a7fb2d61e61486ee9edb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/9b87907a81b87bc76d19a7fb2d61e61486ee9edb", - "reference": "9b87907a81b87bc76d19a7fb2d61e61486ee9edb", - "shasum": "" - }, - "require": { - "php": "^5.4 || ^7.0 || ^8.0", - "symfony/polyfill-mbstring": "^1.17" - }, - "require-dev": { - "composer/xdebug-handler": "^1.4 || ^2.0", - "phpunit/phpunit": "^4.8.36 || ^7.5.15" - }, - "bin": [ - "bin/jp.php" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "autoload": { - "files": [ - "src/JmesPath.php" - ], - "psr-4": { - "JmesPath\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Declaratively specify how to extract elements from a JSON document", - "keywords": [ - "json", - "jsonpath" - ], - "support": { - "issues": "https://github.com/jmespath/jmespath.php/issues", - "source": "https://github.com/jmespath/jmespath.php/tree/2.6.1" - }, - "time": "2021-06-14T00:11:39+00:00" - }, { "name": "nystudio107/craft-plugin-vite", "version": "4.0.8", @@ -9872,5 +9533,5 @@ "platform-overrides": { "php": "8.1.10" }, - "plugin-api-version": "2.1.0" + "plugin-api-version": "2.3.0" } diff --git a/api/config/general.php b/api/config/general.php index 129d317a..f23a7d58 100755 --- a/api/config/general.php +++ b/api/config/general.php @@ -10,7 +10,6 @@ use craft\helpers\App; -$s3BucketPathFormat = 'https://s3.%s.amazonaws.com/%s/'; $gcsBucketPathFormat = 'https://storage.googleapis.com/%s/'; return [ @@ -35,11 +34,6 @@ 'aliases' => [ '@webroot' => dirname(__DIR__) . '/web', '@previewUrlFormat' => App::env('ALIAS_PREVIEW_URL_FORMAT'), - '@assetsAssetVariantBaseURL' => sprintf( - $s3BucketPathFormat, - App::env('AWS_ASSET_S3_REGION'), - App::env('AWS_ASSET_S3_BUCKET') - ), '@assetsGeneralBaseURL' => sprintf( $gcsBucketPathFormat, App::env('GCS_GENERAL_BUCKET') @@ -60,6 +54,10 @@ $gcsBucketPathFormat, App::env('GCS_STAFF_BUCKET') ), + '@assetsVariantsBaseURL' => sprintf( + $gcsBucketPathFormat, + App::env('GCS_ASSET_VARIANTS_BUCKET') + ), '@webBaseUrl' => App::env('WEB_BASE_URL') ], diff --git a/api/config/project/project.yaml b/api/config/project/project.yaml index ca052955..cc7572c4 100644 --- a/api/config/project/project.yaml +++ b/api/config/project/project.yaml @@ -1,4 +1,4 @@ -dateModified: 1694647778 +dateModified: 1700092915 email: fromEmail: $EMAIL_FROM_ADDRESS fromName: $EMAIL_SENDER_NAME @@ -18,20 +18,14 @@ fs: hasUrls: true name: 'Asset Variants' settings: - addSubfolderToRootUrl: '1' - autoFocalPoint: '' - bucket: $AWS_ASSET_S3_BUCKET + bucket: $GCS_ASSET_VARIANTS_BUCKET bucketSelectionMode: manual - cfDistributionId: '' - cfPrefix: '' expires: '' - keyId: $AWS_ASSET_KEY_ID - makeUploadsPublic: '1' - region: $AWS_ASSET_S3_REGION - secret: $AWS_ASSET_SECRET_KEY - subfolder: $AWS_ASSET_S3_ASSET_VARIANT_SUBFOLDER - type: craft\awss3\Fs - url: '@assetsAssetVariantBaseURL' + keyFileContents: '' + projectId: $GCP_PROJECT_ID + subfolder: '' + type: craft\googlecloud\Fs + url: '@assetsVariantsBaseURL' cantoDam: hasUrls: true name: 'Canto DAM' @@ -405,10 +399,6 @@ plugins: edition: standard enabled: true schemaVersion: 3.0.0 - aws-s3: - edition: standard - enabled: true - schemaVersion: '2.0' contact-form: edition: standard enabled: true diff --git a/docker-compose-local-db.sample.yaml b/docker-compose-local-db.sample.yaml index f3ee98d8..8966a9b7 100644 --- a/docker-compose-local-db.sample.yaml +++ b/docker-compose-local-db.sample.yaml @@ -47,11 +47,6 @@ services: CANTO_AUTH_ENDPOINT: https://oauth.canto.com/oauth/api/oauth2/token?app_id={appId}&app_secret={secretKey}&grant_type=client_credentials&refresh_token= CANTO_ASSET_ENDPOINT: CANTO_ASSET_BASEURL: - AWS_ASSET_KEY_ID: - AWS_ASSET_SECRET_KEY: - AWS_ASSET_S3_BUCKET: - AWS_ASSET_S3_REGION: - AWS_ASSET_S3_ASSET_VARIANT_SUBFOLDER: FACEBOOK_APP_ID: FACEBOOK_APP_SECRET: FACEBOOK_APP_REDIRECT_URL: /sso-redirect?sso=true&facebook=true