Skip to content

Commit

Permalink
Merge pull request #42 from madnest/feature/fix-1.2.1-tag
Browse files Browse the repository at this point in the history
Fix 1.2.1 tag
  • Loading branch information
repl6669 authored Apr 5, 2024
2 parents a8c2648 + 07b610c commit b7b58b0
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 87 deletions.
78 changes: 45 additions & 33 deletions .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,48 @@
name: Tests

on: [push, pull_request]

on:
pull_request:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
php: [8.1, 8.0]
stability: [prefer-lowest, prefer-stable]

name: P${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
coverage: none

- name: Setup problem matchers
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Install dependencies
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction

- name: Execute tests
run: vendor/bin/phpunit
build:
runs-on: ubuntu-latest

strategy:
matrix:
php: [7.3, 7.4, 8.0]
laravel: [8]
steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif
tools: composer:v2
coverage: none
ini-values: error_reporting=E_ALL

- name: Set Laravel Version
run: composer require "laravel/framework:^${{ matrix.laravel }}" --no-update

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
restore-keys: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-

- name: Install dependencies
uses: nick-fields/retry@v2
with:
timeout_minutes: 5
max_attempts: 5
command: composer update --prefer-dist --no-interaction --no-progress

- name: Execute tests
run: composer test
106 changes: 53 additions & 53 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
{
"name": "madnest/madzipper",
"description": "Wannabe successor of Chumper/Zipper package for Laravel",
"type": "library",
"license": "MIT",
"authors": [
{
"name": "Jakub Theimer",
"email": "[email protected]",
"homepage": "https://madne.st",
"role": "Developer"
}
],
"require": {
"php": "^7.3|^8.0",
"ext-zip": "*",
"illuminate/support": "^9.0",
"illuminate/filesystem": "^9.0"
},
"require-dev": {
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^6.0",
"orchestra/testbench": "^7.0",
"phpunit/phpunit": "^9.5"
},
"autoload": {
"psr-4": {
"Madnest\\Madzipper\\": "src/Madnest/Madzipper"
}
},
"autoload-dev": {
"psr-4": {
"Madnest\\Madzipper\\Tests\\": "tests/"
}
},
"scripts": {
"test": "vendor/bin/phpunit --colors=always",
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"
},
"config": {
"sort-packages": true
},
"extra": {
"laravel": {
"providers": [
"Madnest\\Madzipper\\MadzipperServiceProvider"
],
"aliases": {
"Madzipper": "Madnest\\Madzipper\\Madzipper"
}
}
},
"minimum-stability": "dev",
"prefer-stable": true
"name": "madnest/madzipper",
"description": "Wannabe successor of Chumper/Zipper package for Laravel",
"type": "library",
"license": "MIT",
"authors": [
{
"name": "Jakub Theimer",
"email": "[email protected]",
"homepage": "https://madne.st",
"role": "Developer"
}
],
"require": {
"php": "^7.3|^8.0",
"ext-zip": "*",
"illuminate/support": "^8.0",
"illuminate/filesystem": "^8.0"
},
"require-dev": {
"mockery/mockery": "^1.5",
"nunomaduro/collision": "^5.11",
"orchestra/testbench": "^6.43",
"phpunit/phpunit": "^9.5"
},
"autoload": {
"psr-4": {
"Madnest\\Madzipper\\": "src/Madnest/Madzipper"
}
},
"autoload-dev": {
"psr-4": {
"Madnest\\Madzipper\\Tests\\": "tests/"
}
},
"scripts": {
"test": "vendor/bin/phpunit --colors=always",
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"
},
"config": {
"sort-packages": true
},
"extra": {
"laravel": {
"providers": [
"Madnest\\Madzipper\\MadzipperServiceProvider"
],
"aliases": {
"Madzipper": "Madnest\\Madzipper\\Madzipper"
}
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
5 changes: 4 additions & 1 deletion src/Madnest/Madzipper/Repositories/ZipRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ class ZipRepository implements RepositoryInterface
{
private $archive;

public bool $open = false;
/**
* @var bool
*/
public $open = false;

/**
* Construct with a given path.
Expand Down

0 comments on commit b7b58b0

Please sign in to comment.