Skip to content

PHP8 support #1

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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ build:
postgresql: false
redis: false
rabbitmq: false
php: 7.1
php: 7.3
tests:
override: ['php-scrutinizer-run']

Expand All @@ -22,7 +22,7 @@ filter:
# but treated as a dependency

tools:
external_code_coverage:
external_code_coverage:
timeout: 180

checks:
Expand Down
15 changes: 14 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dist: focal
language: php

cache:
Expand Down Expand Up @@ -35,14 +36,26 @@ jobs:

include:
- stage: Tests
php: 7.3
php: 8
env: COMPOSER_ARGS=--ignore-platform-reqs REMOVE_QA=yes
script:
- ./vendor/bin/phpunit --testsuite unit -v -c .travis/phpunit.xml

- stage: Tests
php: 7.4
env: XDEBUG=yes INSTALL_FFMPEG=yes REMOVE_QA=yes
script:
- ./vendor/bin/phpunit -v -c .travis/phpunit.xml --coverage-clover=coverage.xml
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.xml
- bash <(curl -s https://codecov.io/bash)

- stage: Tests
php: 7.3
env: XDEBUG=false INSTALL_FFMPEG=yes REMOVE_QA=yes
script:
- ./vendor/bin/phpunit -v -c .travis/phpunit.xml --coverage-clover=coverage.xml

- stage: Tests
php: 7.2
env: INSTALL_FFMPEG=yes DEPS=lowest REMOVE_QA=yes
Expand Down
2 changes: 1 addition & 1 deletion captainhook.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"enabled": true,
"actions": [
{
"action": "composer cs-fix && composer phpstan",
"action": "composer cs-fix",
"options": []
}
]
Expand Down
26 changes: 13 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,39 +26,39 @@
"bin/mediatools-cli.php"
],
"require": {
"php": "^7.1",
"php": "^7.1 || ^8.0",
"ext-json": "*",
"ext-pcre": "*",
"psr/container": "^1.0",
"psr/http-message": "^1.0.1",
"psr/log": "^1.0",
"monolog/monolog": "^1.23",
"scriptfusion/byte-formatter": "^3.2",
"soluble/mediatools": "^2.0",
"symfony/console": "^4.3",
"scriptfusion/byte-formatter": "^3.3.0",
"soluble/mediatools": "^2.1",
"symfony/console": "^4.3 || ^v5.2.1",
"symfony/cache": "^4.3",
"symfony/finder": "^4.3",
"symfony/polyfill-mbstring": "^1.9",
"symfony/polyfill-mbstring": "^1.18",
"zendframework/zend-servicemanager": "^3.4"
},
"require-dev" : {
"bamarni/composer-bin-plugin": "^1.2",
"captainhook/plugin-composer": "^4.0",
"captainhook/plugin-composer": "^5.2.3",
"consistence/coding-standard": "^3.8",
"fig/http-message-util": "^1.1.2",
"friendsofphp/php-cs-fixer": "^2.14.2",
"infection/infection": "^0.12",
"mikey179/vfsstream": "^1.6",
"phpstan/phpstan": "^0.11.4",
"phpstan/phpstan-phpunit": "^0.11",
"phpstan/phpstan-strict-rules": "^0.11",
"phpstan/phpstan-symfony": "^0.11.5",
"phpstan/phpstan-webmozart-assert": "^0.11.0",
"phpstan/phpstan": "^0.12.64",
"phpstan/phpstan-phpunit": "^0.12.17",
"phpstan/phpstan-strict-rules": "^0.12.7",
"phpstan/phpstan-symfony": "^0.11.6 || ^0.12.12",
"phpstan/phpstan-webmozart-assert": "^0.12.8",
"phpunit/phpunit": "^7.5 || ^8.0",
"roave/security-advisories": "dev-master",
"slevomat/coding-standard": "^5.0",
"slevomat/coding-standard": "^6.4.1",
"squizlabs/php_codesniffer": "^3.4",
"vimeo/psalm": "^3.2.10"
"vimeo/psalm": "^3.15"
},
"config": {
"optimize-autoloader": true,
Expand Down
49 changes: 32 additions & 17 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,14 @@ theme:
font:
text: 'Lato'
code: 'Roboto Mono'
logo:
icon: 'play_circle_outline'
logo: logo
feature:
tabs: false

# Customization
extra:
social:
- type: 'github'
- icon: fontawesome/brands/github
link: 'https://github.com/soluble-io/soluble-mediatools-cli'

extra_css:
Expand All @@ -50,26 +49,42 @@ extra_css:

# Extensions
markdown_extensions:
- markdown.extensions.admonition
- markdown.extensions.codehilite:
guess_lang: false
- markdown.extensions.def_list
- markdown.extensions.footnotes
- markdown.extensions.meta
- markdown.extensions.toc:
- admonition
- abbr
- attr_list
- def_list
- footnotes
- meta
- md_in_html
- toc:
permalink: true
- pymdownx.arithmatex
- pymdownx.betterem
# smart_enable: all
- pymdownx.arithmatex:
generic: true
- pymdownx.betterem:
smart_enable: all
- pymdownx.caret
- pymdownx.critic
- pymdownx.details
- pymdownx.emoji:
emoji_generator: !!python/name:pymdownx.emoji.to_svg
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg
- pymdownx.highlight
- pymdownx.inlinehilite
- pymdownx.magiclink
- pymdownx.keys
- pymdownx.magiclink:
repo_url_shorthand: true
user: squidfunk
repo: mkdocs-material
- pymdownx.mark
- pymdownx.smartsymbols
- pymdownx.superfences
- pymdownx.tasklist
- pymdownx.snippets:
check_paths: true
- pymdownx.superfences:
custom_fences:
- name: mermaid
class: mermaid
format: !!python/name:pymdownx.superfences.fence_code_format
- pymdownx.tabbed
- pymdownx.tasklist:
custom_checkbox: true
- pymdownx.tilde
2 changes: 2 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ parameters:
- php
- dist
reportUnmatchedIgnoredErrors: false
checkMissingIterableValueType: false

ignoreErrors:

# Wrong case for phpstan
Expand Down
10 changes: 6 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#
# Dependencies for documentation
#
mkdocs>=1
Pygments>=2.2
pymdown-extensions>=4.11
mkdocs-material>=4
mkdocs>=1.1
Pygments>=2.4
markdown>=3.2
pymdown-extensions>=7.0
mkdocs-material>=6.2
mkdocs-material-extensions>=1.0

1 change: 1 addition & 0 deletions src/Cli/Command/ConvertDirCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int

if ($input->getOption('output') !== null) {
$outputDir = $input->getOption('output');
Assert::string($outputDir);
Assert::directory($outputDir);
Assert::writable($outputDir);
} else {
Expand Down
6 changes: 6 additions & 0 deletions src/Cli/Command/ScanCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@ protected function execute(InputInterface $input, OutputInterface $output): int
return 0;
}

/**
* @param OutputInterface $output
* @param array $rows
* @param int $totalSize
* @param array<mixed> $columns
*/
public static function renderMediaInTable(OutputInterface $output, array $rows, int $totalSize, array $columns = []): void
{
$sizeFormatter = new ByteFormatter();
Expand Down