Skip to content

Commit

Permalink
Removed file contents
Browse files Browse the repository at this point in the history
  • Loading branch information
Mārtiņš Ručevskis committed Dec 18, 2023
1 parent fea07f9 commit d0f9973
Show file tree
Hide file tree
Showing 25 changed files with 124 additions and 17,854 deletions.
20 changes: 0 additions & 20 deletions .github/workflows/php-cs-fixer.yml
Original file line number Diff line number Diff line change
@@ -1,20 +0,0 @@
name: Code style
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
cs-fixer:
runs-on: ubuntu-latest
steps:
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: '8.1'
- uses: actions/checkout@v3
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Run php-cs-fixer
run: ./vendor/bin/php-cs-fixer fix --config=phpCsFixerConfig.php --dry-run --diff


22 changes: 0 additions & 22 deletions .github/workflows/php-stan.yml
Original file line number Diff line number Diff line change
@@ -1,22 +0,0 @@
name: Static analysis

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
PHP-Stan:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: '8.1'
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Run PHPStan
uses: php-actions/phpstan@v3
22 changes: 0 additions & 22 deletions .github/workflows/php-unit.yml
Original file line number Diff line number Diff line change
@@ -1,22 +0,0 @@
name: Tests

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
PHP-Unit:

runs-on: ubuntu-latest

steps:
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: '8.1'
- uses: actions/checkout@v3
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Execute tests
run: ./vendor/bin/phpunit
20 changes: 20 additions & 0 deletions .idea/php.xml

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

6 changes: 6 additions & 0 deletions .idea/vcs.xml

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

98 changes: 98 additions & 0 deletions .idea/workspace.xml

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

21 changes: 0 additions & 21 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +0,0 @@
MIT License

Copyright (c) 2023 MartinsRucevskis

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
62 changes: 0 additions & 62 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,62 +0,0 @@
# Composer constraint upgrader

Helps You automatically resolve composer conflicts

E.g. Need to upgrade your framework to the newest version? Just run
```bash
composer major-update --composer-json=composerPath --constraint=package/package:^10.0 --constraint=php:^8.1
```
Want to upgrade minor versions and also update your compose.json file to the up-to-date versions? Run
```
composer minor-update --composer-json=composerPath
```

## Installation

Use composer to automatically add it Your project

```bash
composer require martinsr/constraint-updater
```

## How to use

- Add it to Your project
- Specify your composer json/lock location when running any of the commands if needed
```bash
--composer-json=composer/json/path --composer-lock=composer/lock/path
```
- Specify Your needed constraints when running `composer major-update`
```bash
--constraint=php:^8.1 --constraint=package/package:^10.0
```
- Run the either `composer major-update` or `composer minor-update` with your params.

## How it works

### major-update

It will replace all your `composer.json` package versions with `*` except for packages You have added with `--constraint`.

Versions you add for the packages will be taken literally.

#### Examples:
`constraint=laravel/framework:^10.0` will set the version to `^10.0` `constraint=laravel/framework:10.0` will set it to `10.0`.

Would suggest to always add the `^` since composer will still keep the major version the same, while updating to the newest minor version other packages support.

This will make composer install the most up-to-date versions possible, taken the constraints and there won't be any conflicts as long as there is a supported version'.

After composer update has been run, it will fix your `composer.json` file from versions that were installed and specified in Your `composer.lock`

## minor-update

This will run `composer update` and after that fix the `composer.json` with the actual versions that were installed.

#### Examples:

Run
```bash
composer minor-update
```
Will run composer update command, and rebuild composer.json file to have up-to-date dependencies with the lock file
28 changes: 0 additions & 28 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,28 +0,0 @@
{
"name": "martinsr/constraint-updater",
"type": "composer-plugin",
"license": "MIT",
"authors": [
{
"name": "Martins Rucevskis"
}
],
"require": {
"php": "^8.1",
"composer-plugin-api": "^2.3"
},
"require-dev": {
"composer/composer": "^2.0",
"phpunit/phpunit": "10.4.2",
"phpstan/phpstan": "^1.10",
"friendsofphp/php-cs-fixer": "^3.38"
},
"autoload": {
"psr-4": {
"MartinsR\\ComposerConstraintUpdater\\": "src/"
}
},
"extra": {
"class": "MartinsR\\ComposerConstraintUpdater\\ComposerPlugin"
}
}
Loading

0 comments on commit d0f9973

Please sign in to comment.