Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion docs/design/update-message-install-detection.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ is shown even when the user cannot act on it usefully:
## Non-goals

- Silent or unattended self-update. Updates are only ever performed after an
explicit interactive prompt. `self:update` (the PHP command) stays disabled.
explicit interactive prompt. The PHP `self:update` command has been removed.
- Auto-running privileged or remote-code upgrades (`sudo`, `curl … | sh`). For
those channels we print the command rather than executing it (see Phase 2).
- Changing the network-check throttle, the CI gate, or the TTY gate.
Expand Down
1 change: 0 additions & 1 deletion internal/config/platformsh-cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ application:

disabled_commands:
- self:install
- self:update

service:
name: "Upsun (formerly Platform.sh)"
Expand Down
1 change: 0 additions & 1 deletion internal/config/upsun-cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ application:

disabled_commands:
- self:install
- self:update
- local:build
- local:drush-aliases
- project:variable:delete
Expand Down
1 change: 0 additions & 1 deletion internal/legacy/cert_store_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ func openMachineRootStore(t *testing.T) windows.Handle {
return store
}


// withoutHanging fails the test if fn does not return in time.
func withoutHanging(t *testing.T, description string, fn func() error) {
t.Helper()
Expand Down
1 change: 1 addition & 0 deletions internal/legacy/legacy.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ func (c *CLIWrapper) Exec(ctx context.Context, args ...string) error {
cmd.Env = append(
cmd.Env,
"CLI_CONFIG_FILE="+filepath.Join(cacheDir, configBasename),
// Stops update checks in wrapper processes the PHP CLI spawns, e.g. via SSH config.
envPrefix+"UPDATES_CHECK=0",
Comment thread
pjcdawkins marked this conversation as resolved.
envPrefix+"MIGRATE_CHECK=0",
envPrefix+"APPLICATION_PROMPT_SELF_INSTALL=0",
Expand Down
1 change: 0 additions & 1 deletion legacy/.php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
->in(__DIR__)
->notPath([
'config/cache/container.php', // Ignore generated file
'dist/installer.php', // Keep old PHP compatibility
'tests/data', // Ignore test data
])
;
Expand Down
49 changes: 0 additions & 49 deletions legacy/.platform.app.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions legacy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,6 @@ scoop install platform

For manual installation, you can also [download the latest binaries](https://github.com/platformsh/cli/releases/latest).

### Legacy installer

_This installation method is considered legacy and is discouraged, use one of the methods above instead. Starting with version 5.x, this installation method will not be supported._

In order to use the Legacy installer, you need to have an operating system supported by PHP (Linux, OS X, or Windows) and PHP 8.2 or higher, with the following extensions: `curl`, `json`, `pcre`, and `phar`.

Run this command to install the CLI using the legacy installer, given that you have PHP already installed:

```console
curl -sS https://platform.sh/cli/installer | php
```

In some Windows terminals you may need `php.exe` instead of `php`.

## Upgrade

Upgrade using the same tool:
Expand Down Expand Up @@ -94,7 +80,6 @@ Other customization is available via environment variables, including:
* `PLATFORMSH_CLI_SESSION_ID`: change user session (default 'default'). The `session:switch` command (beta) is now available as an alternative.
* `PLATFORMSH_CLI_SHELL_CONFIG_FILE`: specify the shell configuration file that the installer should write to (as an absolute path). If not set, a file such as `~/.bashrc` will be chosen automatically. Set this to an empty string to disable writing to a shell config file.
* `PLATFORMSH_CLI_TOKEN`: an API token. *_Warning_*: An API token can act as the account that created it, with no restrictions. Use a separate machine account to limit the token's access. Additionally, storing a secret in an environment variable can be insecure. It may be better to use the `auth:api-token-login` command. The environment variable is preferable on CI systems like Jenkins and GitLab.
* `PLATFORMSH_CLI_UPDATES_CHECK`: set to 0 to disable the automatic updates check
* `PLATFORMSH_CLI_SSH_AUTO_LOAD_CERT`: set to 0 to disable automatic loading of an SSH certificate when running login or SSH commands
* `PLATFORMSH_CLI_REPORT_DEPRECATIONS`: set to 1 to enable PHP deprecation notices (suppressed by default). They will only be displayed in debug mode (`-vvv`).
* `CLICOLOR_FORCE`: set to 1 or 0 to force colorized output on or off, respectively
Expand Down
8 changes: 0 additions & 8 deletions legacy/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,17 @@
"symfony/filesystem": "^7",
"symfony/process": "^7",
"symfony/event-dispatcher": "^7",
"padraic/phar-updater": "^1.0",
"symfony/dependency-injection": "^7",
"symfony/config": "^7",
"ext-json": "*",
"composer/ca-bundle": "^1.3",
"khill/php-duration": "^1.1",
"symfony/polyfill-mbstring": "^1.19",
"symfony/polyfill-iconv": "^1.19",
"padraic/humbug_get_contents": "dev-allow-php-8 as 1.1.3",
"platformsh/oauth2": "^1@beta",
"giggsey/libphonenumber-for-php-lite": "^8.13",
"symfony/var-dumper": "^7.3"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/pjcdawkins/humbug_get_contents"
}
],
"suggest": {
"drush/drush": "For Drupal projects"
},
Expand Down
142 changes: 1 addition & 141 deletions legacy/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 2 additions & 19 deletions legacy/config-defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ application:

# Version number.
#
# This placeholder is replaced by Box (via the self:build and self:release
# commands) with a manually specified or autogenerated version string.
# This placeholder is replaced by Box (via the self:build command) with a manually
# specified or autogenerated version string.
version: '@version-placeholder@'

# Environment variable prefix for overriding configuration.
Expand All @@ -43,10 +43,6 @@ application:
# Where application state is saved, under the {application.user_config_dir}.
user_state_file: 'state.json'

# Config relating to the self:release command for making GitHub releases.
github_repo: null
release_branch: 'main'

# Whether to prompt to run the self:install command if it wasn't already.
#
# The prompt is never shown under the Go wrapper, nor if multiple CLI
Expand Down Expand Up @@ -85,10 +81,6 @@ application:
# The Composer package name (for legacy PHP Composer installations).
package_name: null

# Legacy installer and manifest locations.
installer_url: null
manifest_url: null

# Enable auto-creating Drush aliases for Drupal environments.
drush_aliases: true

Expand Down Expand Up @@ -389,15 +381,6 @@ pagination:
# Items per page. Can be overridden with --count.
count: 20

# Automatic updates.
# This can be overridden in the user config file.
updates:
# The interval between automatic update checks (in seconds). 604800 = 7 days.
check_interval: 604800

# Overridden by the {application.env_prefix}UPDATES_CHECK env var.
check: true

# Whether to enable migration to the new Go "wrapper" CLI.
migrate:
prompt: false
Expand Down
4 changes: 0 additions & 4 deletions legacy/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,10 @@ application:
user_config_dir: '.platformsh'

package_name: 'platformsh/cli'
installer_url: 'https://platform.sh/cli/installer'
manifest_url: 'https://platform.sh/cli/manifest.json'
github_repo: 'platformsh/legacy-cli'

mark_unwrapped_legacy: true
wrapped_disabled_commands:
- self:install
- self:update

service:
name: 'Upsun (formerly Platform.sh)'
Expand Down
2 changes: 0 additions & 2 deletions legacy/config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ services:
public: true
Platformsh\Cli\Service\SelfInstallChecker:
public: true
Platformsh\Cli\Service\SelfUpdateChecker:
public: true

# Configure the cache service, which is created via a factory.
Doctrine\Common\Cache\CacheProvider:
Expand Down
Loading
Loading