├── .github ├── dependabot.yml └── workflows │ └── tests.yml ├── LICENSE ├── README.md ├── commands └── web │ ├── drupal │ ├── nightwatch │ └── phpunit ├── config.ddev-drupal-core-dev.yaml ├── core-dev ├── .env ├── gitignore └── src │ └── Command │ ├── AdminLoginCommand.php │ ├── BootCommand.php │ ├── CacheCommand.php │ ├── LintCommand.php │ ├── LintCspellCommand.php │ ├── LintCssCommand.php │ ├── LintJsCommand.php │ ├── LintPhpCsCommand.php │ ├── LintPhpStanCommand.php │ ├── ModuleInstallCommand.php │ ├── TestBrowserCommand.php │ ├── TestCommand.php │ ├── TestExtensionsCommand.php │ └── UninstallCommand.php ├── docker-compose.core-dev-selenium.yaml ├── install.yaml ├── tests └── test.bats └── web-build └── Dockerfile.chromium /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "docker-compose" 9 | directory: "/" # Location of package manifests 10 | schedule: 11 | interval: "daily" 12 | -------------------------------------------------------------------------------- /.github/workflows/tests.yml: -------------------------------------------------------------------------------- 1 | name: tests 2 | on: 3 | pull_request: 4 | push: 5 | branches: [ main ] 6 | 7 | schedule: 8 | - cron: '25 08 * * *' 9 | 10 | workflow_dispatch: 11 | inputs: 12 | debug_enabled: 13 | type: boolean 14 | description: Debug with tmate 15 | required: false 16 | default: false 17 | 18 | # This is required for "gautamkrishnar/keepalive-workflow" 19 | permissions: 20 | actions: write 21 | 22 | jobs: 23 | tests: 24 | strategy: 25 | matrix: 26 | ddev_version: [stable, HEAD] 27 | fail-fast: false 28 | 29 | runs-on: ubuntu-latest 30 | 31 | steps: 32 | - uses: ddev/github-action-add-on-test@v2 33 | with: 34 | ddev_version: ${{ matrix.ddev_version }} 35 | token: ${{ secrets.GITHUB_TOKEN }} 36 | debug_enabled: ${{ github.event.inputs.debug_enabled }} 37 | addon_repository: ${{ env.GITHUB_REPOSITORY }} 38 | addon_ref: ${{ env.GITHUB_REF }} 39 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ddev-core-dev 2 | 3 | This is a DDEV addon for doing Drupal core development. 4 | 5 | We're in #ddev-for-core-dev on [Drupal Slack](https://www.drupal.org/community/contributor-guide/reference-information/talk/tools/slack) (but please try and keep work 6 | and feature requests in Issues where it's visible to all 🙏) 7 | 8 | ## Installation 9 | ``` 10 | git clone https://git.drupalcode.org/project/drupal.git drupal 11 | cd drupal 12 | ddev config --omit-containers=db --disable-settings-management 13 | ddev composer install 14 | ddev add-on get justafish/ddev-drupal-core-dev 15 | 16 | # See included commands 17 | ddev drupal list 18 | ``` 19 | 20 | The `drupal` command is an extension of core's [`drupal`](https://git.drupalcode.org/project/drupal/-/blob/11.x/core/scripts/drupal?ref_type=heads) 21 | command. This allows you to perform some basic tasks without needing to install 22 | `drush` which will alter your composer dependencies. 23 | 24 | ## Examples 25 | ``` 26 | # Install drupal 27 | # Run "ddev drupal install" to see all available options 28 | ddev drupal install standard 29 | 30 | # Run PHPUnit tests 31 | ddev phpunit core/modules/announcements_feed 32 | 33 | # Run Nightwatch tests (currently only runs on Chrome) 34 | ddev nightwatch --tag core 35 | ``` 36 | 37 | ## Nightwatch Examples 38 | 39 | You can watch Nightwatch running in real time at https://drupal.ddev.site:7900 40 | for Chrome and https://drupal.ddev.site:7901 for Firefox. The password is 41 | "secret". YMMV using Firefox as core tests don't currently run on it. 42 | 43 | Only core tests 44 | ``` 45 | ddev nightwatch --tag core 46 | ``` 47 | 48 | Skip running core tests 49 | ``` 50 | ddev nightwatch --skiptags core 51 | ``` 52 | 53 | Run a single test 54 | ``` 55 | ddev nightwatch tests/Drupal/Nightwatch/Tests/exampleTest.js 56 | ``` 57 | 58 | a11y tests for both the admin and default themes 59 | ``` 60 | ddev nightwatch --tag a11y 61 | ``` 62 | 63 | a11y tests for the admin theme only 64 | ``` 65 | ddev nightwatch --tag a11y:admin 66 | ``` 67 | 68 | a11y tests for the default theme only 69 | ``` 70 | ddev nightwatch --tag a11y:default 71 | ``` 72 | 73 | a11y test for a custom theme used as the default theme 74 | ``` 75 | ddev nightwatch --tag a11y:default --defaultTheme bartik 76 | ``` 77 | 78 | a11y test for a custom admin theme 79 | ``` 80 | ddev nightwatch --tag a11y:admin --adminTheme seven 81 | ``` 82 | 83 | ## Core Linting 84 | 85 | This will run static tests against core standards. 86 | 87 | ``` 88 | ddev drupal lint:phpstan 89 | ddev drupal lint:phpcs 90 | ddev drupal lint:js 91 | ddev drupal lint:css 92 | ddev drupal lint:cspell 93 | # CSpell against only modified files 94 | ddev drupal lint:cspell --modified-only 95 | ``` 96 | 97 | You can run all linting with `ddev drupal lint`, or with fail-fast turned on: 98 | `ddev drupal lint --stop-on-failure` 99 | -------------------------------------------------------------------------------- /commands/web/drupal: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | 3 | addPsr4('DrupalCoreDev\\', $composer_root . '/.ddev/core-dev/src/'); 40 | 41 | $application = new Application('drupal', \Drupal::VERSION); 42 | 43 | $application->add(new InstallCommand($loader)); 44 | $application->add(new UninstallCommand()); 45 | $application->add(new ModuleInstallCommand($loader)); 46 | $application->add(new CacheCommand($loader)); 47 | $application->add(new AdminLoginCommand($loader)); 48 | $application->add(new GenerateTheme()); 49 | $application->add(new TestCommand()); 50 | $application->add(new TestExtensionsCommand()); 51 | $application->add(new TestBrowserCommand()); 52 | $application->add(new LintPhpCsCommand()); 53 | $application->add(new LintPhpStanCommand()); 54 | $application->add(new LintCssCommand()); 55 | $application->add(new LintJsCommand()); 56 | $application->add(new LintCspellCommand()); 57 | $application->add(new LintCommand()); 58 | 59 | $application->run(); 60 | -------------------------------------------------------------------------------- /commands/web/nightwatch: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #ddev-generated 4 | ## Description: Run Nightwatch 5 | ## Usage: nightwatch 6 | ## Example: ddev nightwatch --tag core 7 | 8 | echo "Clearing old webdriver sessions" 9 | curl -f -s http://chrome:4444/status | jq -r '.value.nodes[].slots[].session.sessionId' | while read -r session; do if [ "$session" != "null" ]; then curl -X DELETE "http://chrome:4444/session/$session"; fi; done 10 | CORE_FOLDER=core 11 | if [ -d "web/core" ]; then 12 | CORE_FOLDER=web/core 13 | fi 14 | cd $CORE_FOLDER && yarn test:nightwatch "$@" 15 | -------------------------------------------------------------------------------- /commands/web/phpunit: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #ddev-generated 4 | ## Description: Run PHPUnit 5 | ## Usage: phpunit 6 | ## Example: "ddev phpunit core/modules/field" 7 | 8 | if ! command -v phpunit >/dev/null; then 9 | echo "phpunit is not in PATH in the web container. You probably forgot to 'ddev composer install'" 10 | exit 2 11 | fi 12 | echo "Clearing old webdriver sessions" 13 | curl -f -s http://chrome:4444/status | jq -r '.value.nodes[].slots[].session.sessionId' | while read -r session; do if [ "$session" != "null" ]; then curl -X DELETE "http://chrome:4444/session/$session"; fi; done 14 | CORE_FOLDER=core 15 | if [ -d "web/core" ]; then 16 | CORE_FOLDER=web/core 17 | fi 18 | set -a 19 | source $CORE_FOLDER/.env 20 | set +a 21 | phpunit -c $CORE_FOLDER "$@" 22 | -------------------------------------------------------------------------------- /config.ddev-drupal-core-dev.yaml: -------------------------------------------------------------------------------- 1 | # #ddev-generated 2 | # This file is placed by the justafish/ddev-drupal-core-dev addon. 3 | 4 | ddev_version_constraint: '>=v1.23.1' 5 | omit_containers: ["db"] 6 | upload_dirs: 7 | # The install technique tries to remove all of sites/default/files 8 | # but with DDEV + mutagen that isn't possible. 9 | # so just redirect the upload_dirs. 10 | - .ddev/tmp 11 | -------------------------------------------------------------------------------- /core-dev/.env: -------------------------------------------------------------------------------- 1 | #ddev-generated 2 | # This is a dotenv file used by JavaScript tasks. 3 | # Copy this to '.env' to override. 4 | 5 | ############################# 6 | # General Test Environment # 7 | ############################# 8 | # This is the URL that Drupal can be accessed by. You don't need an installed 9 | # site here, just make sure you can at least access the installer screen. If you 10 | # don't already have one running, e.g. Apache, you can use PHP's built-in web 11 | # server by running the following command in your Drupal root folder: 12 | # php -S localhost:8888 .ht.router.php 13 | # DRUPAL_TEST_BASE_URL=http://localhost:8888 14 | DRUPAL_TEST_BASE_URL=http://web 15 | SIMPLETEST_BASE_URL=$DRUPAL_TEST_BASE_URL 16 | 17 | # Tests need to be executed with a user in the same group as the web server 18 | # user. 19 | #DRUPAL_TEST_WEBSERVER_USER=www-data 20 | 21 | # By default we use sqlite as database. Use 22 | # mysql://username:password@localhost/databasename#table_prefix for mysql. 23 | DRUPAL_TEST_DB_URL=sqlite://localhost/sites/default/files/db.sqlite 24 | SIMPLETEST_DB=$DRUPAL_TEST_DB_URL 25 | 26 | BROWSERTEST_OUTPUT_DIRECTORY=/var/www/html/test_output 27 | 28 | ############# 29 | # Webdriver # 30 | ############# 31 | 32 | # If Chromedriver is running as a service elsewhere, set it here. 33 | # When using DRUPAL_TEST_CHROMEDRIVER_AUTOSTART leave this at the default settings. 34 | DRUPAL_TEST_WEBDRIVER_HOSTNAME=chrome 35 | DRUPAL_TEST_WEBDRIVER_PORT=4444 36 | 37 | # If using Selenium, override the path prefix here. 38 | # See http://nightwatchjs.org/gettingstarted#browser-drivers-setup 39 | #DRUPAL_TEST_WEBDRIVER_PATH_PREFIX=/wd/hub 40 | 41 | MINK_DRIVER_ARGS='["chrome", {"browserName":"chrome", "goog:chromeOptions":{"w3c": true, "args":["--no-sandbox","--ignore-certificate-errors", "--allow-insecure-localhost"]}}, "http://chrome:4444"]' 42 | MINK_DRIVER_ARGS_WEBDRIVER=$MINK_DRIVER_ARGS 43 | 44 | ################ 45 | # Chromedriver # 46 | ################ 47 | 48 | # Automatically start chromedriver for local development. Set to false when you 49 | # use your own webdriver or chromedriver setup. 50 | # Also set it to false when you use a different browser for testing. 51 | DRUPAL_TEST_CHROMEDRIVER_AUTOSTART=false 52 | 53 | # A list of arguments to pass to Chrome, separated by spaces 54 | # e.g. `--disable-gpu --headless --no-sandbox`. 55 | #DRUPAL_TEST_WEBDRIVER_CHROME_ARGS= 56 | 57 | # Use W3C webdriver commands. 58 | DRUPAL_TEST_WEBDRIVER_W3C=true 59 | 60 | # A list of arguments to pass to Webdriver, separated by spaces 61 | # e.g. `--allowed-ips --disable-dev-shm-usage`. 62 | #DRUPAL_TEST_WEBDRIVER_CLI_ARGS= 63 | 64 | ############## 65 | # Nightwatch # 66 | ############## 67 | 68 | # Nightwatch generates output files. Use this to specify the location where these 69 | # files need to be stored. The default location is ignored by git, if you modify 70 | # the location you will probably want to add this location to your .gitignore. 71 | DRUPAL_NIGHTWATCH_OUTPUT=test_output/nightwatch 72 | 73 | # The path that Nightwatch searches for assumes the same directory structure as 74 | # when you download Drupal core. If you have Drupal installed into a docroot 75 | # folder, you can use the following folder structure to add integration tests 76 | # for your project, outside of tests specifically for custom modules/themes/profiles. 77 | # 78 | # . 79 | # ├── docroot 80 | # │ ├── core 81 | # ├── tests 82 | # │ ├── Nightwatch 83 | # │ │ ├── Tests 84 | # │ │ │ ├── myTest.js 85 | # 86 | # and then set DRUPAL_NIGHTWATCH_SEARCH_DIRECTORY=../ 87 | # 88 | #DRUPAL_NIGHTWATCH_SEARCH_DIRECTORY= 89 | 90 | # Filter directories to look for tests. This uses minimatch syntax. 91 | # Separate folders with a comma. 92 | DRUPAL_NIGHTWATCH_IGNORE_DIRECTORIES=node_modules,vendor,.*,sites/*/files,sites/*/private,sites/simpletest 93 | -------------------------------------------------------------------------------- /core-dev/gitignore: -------------------------------------------------------------------------------- 1 | #ddev-generated 2 | .gitignore 3 | /.ddev 4 | /sites/default/settings.php 5 | /sites/sites.php 6 | /sites/simpletest 7 | /sites/default/files 8 | /vendor 9 | test_output -------------------------------------------------------------------------------- /core-dev/src/Command/AdminLoginCommand.php: -------------------------------------------------------------------------------- 1 | setName('login') 16 | ->setDescription('Generates a one-time login link for User 1'); 17 | 18 | parent::configure(); 19 | } 20 | 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | protected function execute(InputInterface $input, OutputInterface $output): int { 25 | parent::execute($input, $output); 26 | $output->writeln(getenv('DDEV_PRIMARY_URL') . $this->getOneTimeLoginUrl()); 27 | return 0; 28 | } 29 | 30 | protected function getOneTimeLoginUrl() { 31 | $user = User::load(1); 32 | \Drupal::moduleHandler()->load('user'); 33 | return user_pass_reset_url($user); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /core-dev/src/Command/BootCommand.php: -------------------------------------------------------------------------------- 1 | classLoader = $class_loader; 32 | } 33 | 34 | /** 35 | * {@inheritdoc} 36 | */ 37 | protected function execute(InputInterface $input, OutputInterface $output): int { 38 | $io = new SymfonyStyle($input, $output); 39 | try { 40 | $this->boot(); 41 | } 42 | catch (ConnectionNotDefinedException $e) { 43 | $io->getErrorStyle()->error("No installation found. Use the 'install' command."); 44 | return 1; 45 | } 46 | 47 | return 0; 48 | } 49 | 50 | /** 51 | * Boots up a Drupal environment. 52 | * 53 | * @return \Drupal\Core\DrupalKernelInterface 54 | * The Drupal kernel. 55 | * 56 | * @throws \Exception 57 | * Exception thrown if kernel does not boot. 58 | */ 59 | protected function boot() { 60 | $kernel = new DrupalKernel('prod', $this->classLoader, FALSE); 61 | $kernel::bootEnvironment(); 62 | $kernel->setSitePath($this->getSitePath()); 63 | Settings::initialize($kernel->getAppRoot(), $kernel->getSitePath(), $this->classLoader); 64 | $kernel->boot(); 65 | // Some services require a request to work. For example, CommentManager. 66 | // This is needed as generating the URL fires up entity load hooks. 67 | $request = Request::createFromGlobals(); 68 | $kernel->getContainer() 69 | ->get('request_stack') 70 | ->push($request); 71 | $kernel->preHandle($request); 72 | 73 | return $kernel; 74 | } 75 | 76 | /** 77 | * Gets the site path. 78 | * 79 | * Defaults to 'sites/default'. For testing purposes this can be overridden 80 | * using the DRUPAL_DEV_SITE_PATH environment variable. 81 | * 82 | * @return string 83 | * The site path to use. 84 | */ 85 | protected function getSitePath() { 86 | return getenv('DRUPAL_DEV_SITE_PATH') ?: 'sites/default'; 87 | } 88 | } 89 | 90 | -------------------------------------------------------------------------------- /core-dev/src/Command/CacheCommand.php: -------------------------------------------------------------------------------- 1 | setName('cache') 16 | ->setDescription('Clears all caches and the container registry'); 17 | } 18 | 19 | /** 20 | * {@inheritdoc} 21 | */ 22 | protected function execute(InputInterface $input, OutputInterface $output): int { 23 | parent::execute($input, $output); 24 | drupal_flush_all_caches(); 25 | $output->writeln('Caches cleared.'); 26 | return 0; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /core-dev/src/Command/LintCommand.php: -------------------------------------------------------------------------------- 1 | setName('lint') 18 | ->setDescription('Run lint tests.') 19 | ->addOption('stop-on-failure', null, InputOption::VALUE_NONE, 'Stop all test execution once a failure is found.'); 20 | } 21 | 22 | /** 23 | * {@inheritdoc} 24 | */ 25 | protected function execute(InputInterface $input, OutputInterface $output): int { 26 | $return = 0; 27 | $stop_on_failure = $input->getOption('stop-on-failure'); 28 | 29 | $commands = [ 30 | new LintPhpCsCommand(), 31 | new LintPhpStanCommand(), 32 | new LintCssCommand(), 33 | new LintJsCommand(), 34 | new LintCspellCommand(), 35 | ]; 36 | 37 | foreach ($commands as $command) { 38 | $return_command = $command->execute($input, $output); 39 | if (!$return_command) { 40 | continue; 41 | } 42 | $return = $return_command; 43 | 44 | if ($stop_on_failure) { 45 | return $return; 46 | } 47 | } 48 | 49 | return $return; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /core-dev/src/Command/LintCspellCommand.php: -------------------------------------------------------------------------------- 1 | setName('lint:cspell') 18 | ->setDescription('Run CSpell analysis.') 19 | ->addOption('modified-only', null, InputOption::VALUE_NONE, 'Only run cspell on modified files.'); 20 | } 21 | 22 | /** 23 | * {@inheritdoc} 24 | */ 25 | protected function execute(InputInterface $input, OutputInterface $output): int { 26 | $modified_only = $input->getOption('modified-only'); 27 | $command = "cd core && yarn run spellcheck:core --no-must-find-files"; 28 | if ($modified_only) { 29 | $command = "cd core && git diff --name-only | sed \"s_^_../_\" | yarn run spellcheck:core --no-must-find-files --file-list stdin"; 30 | } 31 | $phpcs = Process::fromShellCommandline($command); 32 | $output->writeln($command); 33 | $phpcs->setTimeout(0); 34 | $phpcs->run(function ($type, $data) use ($output) { 35 | $output->write($data); 36 | }); 37 | if ($phpcs->getExitCode()) { 38 | return 1; 39 | } 40 | return 0; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /core-dev/src/Command/LintCssCommand.php: -------------------------------------------------------------------------------- 1 | setName('lint:css') 18 | ->setDescription('Run CSS coding standard analysis against core.'); 19 | } 20 | 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | protected function execute(InputInterface $input, OutputInterface $output): int { 25 | $io = new SymfonyStyle($input, $output); 26 | $yarn = getcwd() . '/core/.yarn'; 27 | $node_modules = getcwd() . '/core/node_modules'; 28 | 29 | // Check if dependencies folder exists before to start. 30 | if(!file_exists($yarn) || !file_exists($node_modules)) { 31 | $io->error('Missing Yarn dependencies. Ensure that you run yarn install before executing this command.'); 32 | return 1; 33 | } 34 | 35 | $command = "cd core && yarn run lint:css --color --custom-formatter=node_modules/stylelint-formatter-gitlab"; 36 | $phpcs = Process::fromShellCommandline($command); 37 | $output->writeln($command); 38 | $phpcs->setTimeout(0); 39 | $phpcs->run(function ($type, $data) use ($output) { 40 | $output->write($data); 41 | }); 42 | if ($phpcs->getExitCode()) { 43 | return 1; 44 | } 45 | return 0; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /core-dev/src/Command/LintJsCommand.php: -------------------------------------------------------------------------------- 1 | setName('lint:js') 18 | ->setDescription('Run JS coding standard analysis against core.'); 19 | } 20 | 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | protected function execute(InputInterface $input, OutputInterface $output): int { 25 | $io = new SymfonyStyle($input, $output); 26 | $yarn = getcwd() . '/core/.yarn'; 27 | $node_modules = getcwd() . '/core/node_modules'; 28 | 29 | // Check if dependencies folder exists before to start. 30 | if(!file_exists($yarn) || !file_exists($node_modules)) { 31 | $io->error('Missing Yarn dependencies. Ensure that you run yarn install before executing this command.'); 32 | return 1; 33 | } 34 | 35 | $command = "cd core && yarn run lint:core-js-passing"; 36 | $phpcs = Process::fromShellCommandline($command); 37 | $output->writeln($command); 38 | $phpcs->setTimeout(0); 39 | $phpcs->run(function ($type, $data) use ($output) { 40 | $output->write($data); 41 | }); 42 | if ($phpcs->getExitCode()) { 43 | return 1; 44 | } 45 | return 0; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /core-dev/src/Command/LintPhpCsCommand.php: -------------------------------------------------------------------------------- 1 | setName('lint:phpcs') 17 | ->setDescription('Run PHPCS coding standard analysis against core.'); 18 | } 19 | 20 | /** 21 | * {@inheritdoc} 22 | */ 23 | protected function execute(InputInterface $input, OutputInterface $output): int { 24 | $command = "composer phpcs -- --report-full --report-summary"; 25 | $phpcs = Process::fromShellCommandline($command); 26 | $output->writeln($command); 27 | $phpcs->setTimeout(0); 28 | $phpcs->run(function ($type, $data) use ($output) { 29 | $output->write($data); 30 | }); 31 | if ($phpcs->getExitCode()) { 32 | return 1; 33 | } 34 | return 0; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /core-dev/src/Command/LintPhpStanCommand.php: -------------------------------------------------------------------------------- 1 | setName('lint:phpstan') 17 | ->setDescription('Run PHPStan code quality analysis against core.'); 18 | } 19 | 20 | /** 21 | * {@inheritdoc} 22 | */ 23 | protected function execute(InputInterface $input, OutputInterface $output): int { 24 | $command = "php vendor/bin/phpstan analyze --configuration=./core/phpstan.neon.dist --error-format=table"; 25 | $phpcs = Process::fromShellCommandline($command); 26 | $output->writeln($command); 27 | $phpcs->setTimeout(0); 28 | $phpcs->run(function ($type, $data) use ($output) { 29 | $output->write($data); 30 | }); 31 | if ($phpcs->getExitCode()) { 32 | return 1; 33 | } 34 | return 0; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /core-dev/src/Command/ModuleInstallCommand.php: -------------------------------------------------------------------------------- 1 | setName('module:install') 18 | ->setDescription('Install modules') 19 | ->addArgument('modules', InputArgument::IS_ARRAY, InputArgument::REQUIRED, []); 20 | } 21 | 22 | /** 23 | * {@inheritdoc} 24 | */ 25 | protected function execute(InputInterface $input, OutputInterface $output): int { 26 | parent::execute($input, $output); 27 | $modules = $input->getArgument('modules'); 28 | if (count($modules) > 0) { 29 | $module_installer = \Drupal::service('module_installer'); 30 | assert($module_installer instanceof ModuleInstallerInterface); 31 | $module_installer->install($modules); 32 | drupal_flush_all_caches(); 33 | } 34 | return 0; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /core-dev/src/Command/TestBrowserCommand.php: -------------------------------------------------------------------------------- 1 | setName('test:browser') 20 | ->setDescription('Set the browser used for tests') 21 | ->addArgument('browser', NULL, InputArgument::REQUIRED, 'Browser name, firefox or chrome'); 22 | } 23 | 24 | /** 25 | * {@inheritdoc} 26 | */ 27 | protected function execute(InputInterface $input, OutputInterface $output): int { 28 | $io = new SymfonyStyle($input, $output); 29 | 30 | $browser = $input->getArgument('browser'); 31 | if (!in_array($browser, ['firefox', 'chrome'])) { 32 | $io->getErrorStyle()->error('Browser name must be firefox or chrome.'); 33 | return 1; 34 | } 35 | 36 | $src = __DIR__ . '/../../phpunit-' . $browser . '.xml'; 37 | $dest = __DIR__ . '/../../../../core/phpunit.xml'; 38 | if (!copy($src, $dest)) { 39 | $io->getErrorStyle()->error("File $src could not be copied to $dest"); 40 | return 1; 41 | } 42 | $phpunit_config = file_get_contents($dest); 43 | $phpunit_config = str_replace('DRUPAL_CORE_DDEV_URL', getenv('DDEV_PRIMARY_URL'), $phpunit_config); 44 | file_put_contents($dest, $phpunit_config); 45 | 46 | if ($browser === 'firefox') { 47 | $output->writeln('Browser switched to firefox'); 48 | $output->writeln('You can watch it running in real-time at ' . getenv('DDEV_PRIMARY_URL') . ':7901'); 49 | $output->writeln('password: secret'); 50 | } 51 | else { 52 | $output->writeln('Browser switched to chrome'); 53 | $output->writeln('You can watch it running in real-time at ' . getenv('DDEV_PRIMARY_URL') . ':7900'); 54 | $output->writeln('password: secret'); 55 | } 56 | 57 | return 0; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /core-dev/src/Command/TestCommand.php: -------------------------------------------------------------------------------- 1 | setName('test') 19 | ->setDescription('Run all core tests using the run-tests.sh script. You probably don\'t want to do this - instead run PHPUnit directly on selected tests e.g. ddev phpunit core/modules/sdc/tests'); 20 | 21 | parent::configure(); 22 | } 23 | 24 | /** 25 | * {@inheritdoc} 26 | */ 27 | protected function execute(InputInterface $input, OutputInterface $output): int { 28 | $io = new SymfonyStyle($input, $output); 29 | 30 | $command = "php ./core/scripts/run-tests.sh --php /usr/bin/php --color --keep-results --concurrency 4 --repeat 1 --sqlite './sites/default/files/.sqlite' --verbose --non-html --all"; 31 | $tests = Process::fromShellCommandline($command); 32 | $output->writeln($command); 33 | $tests->setTimeout(0); 34 | $tests->run(function ($type, $data) use ($output) { 35 | $output->write($data); 36 | }); 37 | if ($tests->getExitCode()) { 38 | $io->error($tests->getErrorOutput()); 39 | return 1; 40 | } 41 | return 0; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /core-dev/src/Command/TestExtensionsCommand.php: -------------------------------------------------------------------------------- 1 | setName('test:extensions-enable') 19 | ->setDescription('Allow test modules and themes to be installed'); 20 | } 21 | 22 | /** 23 | * {@inheritdoc} 24 | */ 25 | protected function execute(InputInterface $input, OutputInterface $output): int { 26 | $io = new SymfonyStyle($input, $output); 27 | $setting = "\$settings['extension_discovery_scan_tests'] = TRUE;\n"; 28 | $file = __DIR__ . '/../../../../sites/default/settings.php'; 29 | $data = file_get_contents($file); 30 | if (str_contains($data, $setting)) { 31 | return 0; 32 | } 33 | 34 | $mode = null; 35 | if (!is_writable($file)) { 36 | try { 37 | $stat = stat($file); 38 | chmod($file, 0744); 39 | } 40 | catch (\Error $e) { 41 | $io->getErrorStyle()->error("Could not set $file to writeable"); 42 | return 1; 43 | } 44 | $mode = $stat['mode'] & 000777; 45 | } 46 | 47 | 48 | file_put_contents($file, $setting, FILE_APPEND); 49 | $output->writeln('extension_discovery_scan_tests enabled in settings.php'); 50 | 51 | if (!is_null($mode)) { 52 | // Reverse the array of unhardened paths because we want to change the 53 | // child item before the parent item. 54 | try { 55 | chmod($file, $mode); 56 | } 57 | catch (\Error $e) { 58 | $io->getErrorStyle()->error("Unable to reharden permissions for $file"); 59 | return 1; 60 | } 61 | } 62 | 63 | return 0; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /core-dev/src/Command/UninstallCommand.php: -------------------------------------------------------------------------------- 1 | setName('uninstall') 17 | ->setDescription('Uninstall Drupal by deleting settings.'); 18 | } 19 | 20 | /** 21 | * {@inheritdoc} 22 | */ 23 | protected function execute(InputInterface $input, OutputInterface $output): int { 24 | $filesystem = new Filesystem(); 25 | $settings = __DIR__ . '/../../../../sites/default/settings.php'; 26 | $files = __DIR__ . '/../../../../sites/default/files'; 27 | $filesystem->chmod($files . '/../', 0755); 28 | $filesystem->chmod($settings, 0777, 0000, true); 29 | $filesystem->remove($settings); 30 | $filesystem->chmod($files, 0777, 0000, true); 31 | $filesystem->remove($files); 32 | return 0; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /docker-compose.core-dev-selenium.yaml: -------------------------------------------------------------------------------- 1 | #ddev-generated 2 | services: 3 | chrome: 4 | container_name: ddev-${DDEV_SITENAME}-chrome 5 | image: selenium/standalone-chromium:136.0.7103.113 6 | labels: 7 | com.ddev.site-name: ${DDEV_SITENAME} 8 | com.ddev.approot: $DDEV_APPROOT 9 | shm_size: 2gb 10 | expose: 11 | - 7900 12 | environment: 13 | - VIRTUAL_HOST=$DDEV_HOSTNAME 14 | - HTTPS_EXPOSE=7900:7900 15 | - HTTP_EXPOSE=7910:7900 16 | links: 17 | - web:web 18 | external_links: 19 | - ddev-router:${DDEV_SITENAME}.${DDEV_TLD} 20 | volumes: 21 | - ".:/mnt/ddev_config:ro" 22 | - ddev-global-cache:/mnt/ddev-global-cache 23 | -------------------------------------------------------------------------------- /install.yaml: -------------------------------------------------------------------------------- 1 | # Details about the install.yaml file are at https://ddev.readthedocs.io/en/latest/users/extend/additional-services/#sections-and-features-of-ddev-get-add-on-installyaml 2 | 3 | name: ddev-drupal-core-dev 4 | 5 | project_files: 6 | - config.ddev-drupal-core-dev.yaml 7 | - docker-compose.core-dev-selenium.yaml 8 | - web-build/Dockerfile.chromium 9 | - commands/web/drupal 10 | - commands/web/phpunit 11 | - commands/web/nightwatch 12 | - core-dev/gitignore 13 | - core-dev/.env 14 | - core-dev/src/Command/AdminLoginCommand.php 15 | - core-dev/src/Command/BootCommand.php 16 | - core-dev/src/Command/CacheCommand.php 17 | - core-dev/src/Command/TestCommand.php 18 | - core-dev/src/Command/TestBrowserCommand.php 19 | - core-dev/src/Command/TestExtensionsCommand.php 20 | - core-dev/src/Command/UninstallCommand.php 21 | - core-dev/src/Command/LintPhpCsCommand.php 22 | - core-dev/src/Command/LintPhpStanCommand.php 23 | - core-dev/src/Command/LintCssCommand.php 24 | - core-dev/src/Command/LintJsCommand.php 25 | - core-dev/src/Command/LintCspellCommand.php 26 | - core-dev/src/Command/LintCommand.php 27 | - core-dev/src/Command/ModuleInstallCommand.php 28 | 29 | post_install_actions: 30 | - cp core-dev/gitignore ../.gitignore 31 | - mkdir -p ../test_output 32 | - chmod +w ../test_output 33 | - | 34 | if ! ddev status | grep -q "chrome:4444"; then 35 | ddev start 36 | fi 37 | - | 38 | if [ -d "../web" ]; then 39 | cp core-dev/.env ../web/core/.env 40 | ddev exec -d /var/www/html/web/core yarn 41 | else 42 | cp core-dev/.env ../core/.env 43 | ddev exec -d /var/www/html/core yarn 44 | fi 45 | - echo "Restarting DDEV and pulling selenium/standalone-chromium image, this may take some time..." 46 | - ddev restart 47 | -------------------------------------------------------------------------------- /tests/test.bats: -------------------------------------------------------------------------------- 1 | setup() { 2 | set -eu -o pipefail 3 | 4 | TEST_BREW_PREFIX="$(brew --prefix 2>/dev/null || true)" 5 | export BATS_LIB_PATH="${BATS_LIB_PATH}:${TEST_BREW_PREFIX}/lib:/usr/lib/bats" 6 | bats_load_library bats-assert 7 | bats_load_library bats-file 8 | bats_load_library bats-support 9 | 10 | export DIR="$(cd "$(dirname "${BATS_TEST_FILENAME}")/.." >/dev/null 2>&1 && pwd)" 11 | export PROJNAME_COMPOSER="test-core-composer" 12 | export PROJNAME_CHECKOUT="test-corecheckout" 13 | mkdir -p ~/tmp 14 | 15 | export TESTDIR_CHECKOUT=$(mktemp -d ~/tmp/${PROJNAME_CHECKOUT}.XXXXXX) 16 | export TESTDIR_COMPOSER=$(mktemp -d ~/tmp/${PROJNAME_COMPOSER}.XXXXXX) 17 | 18 | export DDEV_NONINTERACTIVE=true 19 | export DDEV_NO_INSTRUMENTATION=true 20 | 21 | ddev delete -Oy ${PROJNAME_COMPOSER} >/dev/null 2>&1 22 | ddev delete -Oy ${PROJNAME_CHECKOUT} >/dev/null 2>&1 23 | 24 | composer create-project drupal/recommended-project ${TESTDIR_COMPOSER} --ignore-platform-reqs 25 | cd "${TESTDIR_COMPOSER}" 26 | run ddev config --project-name="${PROJNAME_COMPOSER}" --omit-containers=db --disable-settings-management 27 | assert_success 28 | run ddev start -y 29 | assert_success 30 | run ddev composer install 31 | run ddev composer require drupal/core-dev 32 | 33 | git clone --depth=1 https://git.drupalcode.org/project/drupal.git ${TESTDIR_CHECKOUT} 34 | cd "${TESTDIR_CHECKOUT}" 35 | run ddev config --project-name="${PROJNAME_CHECKOUT}" --omit-containers=db --disable-settings-management 36 | assert_success 37 | run ddev start -y 38 | assert_success 39 | run ddev composer install 40 | } 41 | 42 | health_checks() { 43 | cd "${TESTDIR_COMPOSER}" 44 | ddev exec "curl -s chrome:7900" | grep -q "noVNC" 45 | ddev phpunit web/core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php 46 | ddev phpunit web/core/modules/system/tests/src/FunctionalJavascript/FrameworkTest.php 47 | ddev nightwatch tests/Drupal/Nightwatch/Tests/loginTest.js 48 | 49 | cd "${TESTDIR_CHECKOUT}" 50 | ddev exec "curl -s chrome:7900" | grep -q "noVNC" 51 | ddev phpunit core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php 52 | ddev phpunit core/modules/system/tests/src/FunctionalJavascript/FrameworkTest.php 53 | ddev nightwatch tests/Drupal/Nightwatch/Tests/loginTest.js 54 | } 55 | 56 | teardown() { 57 | set -eu -o pipefail 58 | ddev delete -Oy ${PROJNAME_COMPOSER} >/dev/null 2>&1 59 | ddev delete -Oy ${PROJNAME_CHECKOUT} >/dev/null 2>&1 60 | [ "${TESTDIR_COMPOSER}" != "" ] && rm -rf ${TESTDIR_COMPOSER} 61 | [ "${TESTDIR_CHECKOUT}" != "" ] && rm -rf ${TESTDIR_CHECKOUT} 62 | } 63 | 64 | @test "install from directory" { 65 | set -eu -o pipefail 66 | 67 | cd ${TESTDIR_COMPOSER} 68 | echo "# ddev add-on get ${DIR} with project ${PROJNAME_COMPOSER} in $(pwd)" >&3 69 | run ddev add-on get "${DIR}" 70 | assert_success 71 | 72 | cd ${TESTDIR_CHECKOUT} 73 | echo "# ddev add-on get ${DIR} with project ${PROJNAME_CHECKOUT} in $(pwd)" >&3 74 | run ddev add-on get "${DIR}" 75 | assert_success 76 | 77 | health_checks 78 | 79 | cd ${TESTDIR_COMPOSER} 80 | run ddev restart 81 | assert_success 82 | 83 | cd ${TESTDIR_CHECKOUT} 84 | run ddev restart 85 | assert_success 86 | 87 | health_checks 88 | 89 | cd ${TESTDIR_COMPOSER} 90 | echo "# ddev add-on remove ddev-drupal-core-dev with project ${PROJNAME_COMPOSER} in $(pwd)" >&3 91 | run ddev add-on remove ddev-drupal-core-dev 92 | assert_success 93 | 94 | cd ${TESTDIR_CHECKOUT} 95 | echo "# ddev add-on remove ddev-drupal-core-dev with project ${PROJNAME_CHECKOUT} in $(pwd)" >&3 96 | run ddev add-on remove ddev-drupal-core-dev 97 | assert_success 98 | } 99 | -------------------------------------------------------------------------------- /web-build/Dockerfile.chromium: -------------------------------------------------------------------------------- 1 | #ddev-generated 2 | RUN sudo apt update -y \ 3 | && sudo apt remove chromium* -y \ 4 | && ARCH=$(dpkg --print-architecture) \ 5 | && wget https://ftp.debian.org/debian/pool/main/c/chromium/chromium_136.0.7103.113-1~deb12u1_${ARCH}.deb \ 6 | && wget https://ftp.debian.org/debian/pool/main/c/chromium/chromium-common_136.0.7103.113-1~deb12u1_${ARCH}.deb \ 7 | && wget https://ftp.debian.org/debian/pool/main/c/chromium/chromium-driver_136.0.7103.113-1~deb12u1_${ARCH}.deb \ 8 | && sudo apt install ./chromium*.deb -y \ 9 | && sudo apt-mark hold chromium chromium-common chromium-driver \ 10 | && rm -f chromium*.deb 11 | --------------------------------------------------------------------------------