Skip to content
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

Remove self-update #249

Closed
wants to merge 1 commit into from
Closed
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
16 changes: 6 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ https://github.com/gordalina/cachetool/releases/latest/download/cachetool.phar.g
https://github.com/gordalina/cachetool/releases/latest/download/cachetool.phar.bz2
```

CacheTool is also packaged as a docker container available in [docker hub](https://hub.docker.com/r/gordalina/cachetool) and [github](https://github.com/gordalina/cachetool/pkgs/container/cachetool) container registries.
CacheTool is also packaged as a docker container available in [docker hub](https://hub.docker.com/r/gordalina/cachetool) and [GitHub](https://github.com/gordalina/cachetool/pkgs/container/cachetool) container registries.

See below for [docker usage instructions](#usage-via-docker).

## Installation - old versions

Use tag name in the binary file name. E.g to download cachetool 3.2.2
Use tag name in the binary file name, E.g. to download cachetool 3.2.2
which is compatible with PHP `>=5.5.9` use: `cachetool-3.2.2.phar`

```sh
Expand Down Expand Up @@ -128,7 +128,7 @@ You have some useful commands that you can use

## Usage via Docker

Images are available in docker hub and github container registries:
Images are available in docker hub and GitHub container registries:

- `gordalina/cachetool:latest`
- `ghcr.io/gordalina/cachetool:latest`
Expand Down Expand Up @@ -163,8 +163,8 @@ Thank you to @jonhattan and @NITEMAN for the [work with docker](https://github.c
You can have a configuration file with the adapter configuration, allowing you to
call CacheTool without `--fcgi`, `--cli`, or `--web` option.

You can pass a `--config <file>` option to the application or it will choose to load
a file automaically.
You can pass a `--config <file>` option to the application, otherwise it will choose to load
a file automatically.

The file must be named `.cachetool.yml` or `.cachetool.yaml`. CacheTool will look for
this file on the current directory and in any parent directory until it finds one.
Expand Down Expand Up @@ -261,13 +261,9 @@ $cache->addProxy(new Proxy\ApcuProxy());
$cache->addProxy(new Proxy\PhpProxy());
```

## Updating CacheTool

Running `php cachetool.phar self-update` will update a phar install with the latest version.

## Building cachetool.phar

Cachetool uses [box](https://github.com/box-project/box) to built the phar, see [box-project/installation.md](https://github.com/box-project/box/blob/main/doc/installation.md) on the best way to install it in your situation. To built run `box compile`, which will output `cachetool.phar` in the project root directory.
Cachetool uses [box](https://github.com/box-project/box) to build the phar, see [box-project/installation.md](https://github.com/box-project/box/blob/main/doc/installation.md) on the best way to install it in your situation. To built run `box compile`, which will output `cachetool.phar` in the project root directory.

## Testing

Expand Down
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
"symfony/process": "^6.0",
"symfony/yaml": "^6.0",
"symfony/http-client": "^6.0",
"symfony/http-foundation": "^6.0",
"consolidation/self-update": "~2.1.0"
"symfony/http-foundation": "^6.0"
},
"require-dev": {
"phpunit/phpunit": "^9.0"
Expand Down
203 changes: 2 additions & 201 deletions composer.lock

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

6 changes: 0 additions & 6 deletions src/Console/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
use CacheTool\Command as CacheToolCommand;
use CacheTool\Monolog\ConsoleHandler;
use Monolog\Logger;
use SelfUpdate\SelfUpdateCommand;
use Symfony\Component\Console\Application as BaseApplication;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputDefinition;
Expand Down Expand Up @@ -62,11 +61,6 @@ public function __construct(Config $config)
protected function getDefaultCommands(): array
{
$commands = parent::getDefaultCommands();
$commands[] = new SelfUpdateCommand(
'gordalina/cachetool',
'@package_version@',
'gordalina/cachetool'
);

if (in_array('apcu', $this->config['extensions'], true)) {
$commands[] = new CacheToolCommand\ApcuCacheClearCommand();
Expand Down