Skip to content
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
58 changes: 58 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build

on:
push:
branches: [ main ]
pull_request:
types: [opened, synchronize, reopened]

jobs:
build:
strategy:
fail-fast: false
matrix:
php-versions: ['8.3']
dependency-versions: ['lowest', 'highest']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis

- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}

- run: composer validate --strict

- uses: ramsey/composer-install@v2
with:
dependency-versions: ${{ matrix.dependency-versions }}

- run: vendor/bin/phpcs
if: ${{ failure() || success() }}

- run: vendor/bin/phpstan
if: ${{ failure() || success() }}

- run: XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-clover ./clover.xml --log-junit ./phpunit.report.xml
if: ${{ failure() || success() }}

# https://community.sonarsource.com/t/code-coverage-doesnt-work-with-github-action/16747
# $GITHUB_WORKSPACE contains a slash so @ is used as delimiter
- run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' clover.xml
- run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' phpunit.report.xml

- uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.projectName=php-excel-encoder
-Dsonar.projectKey=assoconnect_php-excel-encoder
-Dsonar.organization=assoconnect
-Dsonar.sources=src
-Dsonar.tests=tests
-Dsonar.php.coverage.reportPaths=clover.xml
-Dsonar.php.tests.reportPath=phpunit.report.xml
14 changes: 0 additions & 14 deletions .github/workflows/php_lint.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/phpunit.yml

This file was deleted.

37 changes: 0 additions & 37 deletions .github/workflows/symfony.yml

This file was deleted.

5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/bin/
/vendor/
.idea/
.idea
.php_cs.cache
.php-cs-fixer.cache
.phpunit.result.cache
test.php
.idea/
test.php
60 changes: 0 additions & 60 deletions .php-cs-fixer.dist.php

This file was deleted.

20 changes: 0 additions & 20 deletions .php-cs-fixer.php-highest.php

This file was deleted.

15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
PHP Excel encoder
=================

[![Code Quality](https://github.com/Ang3/php-excel-encoder/actions/workflows/php_lint.yml/badge.svg)](https://github.com/Ang3/php-excel-encoder/actions/workflows/php_lint.yml)
[![PHPUnit Tests](https://github.com/Ang3/php-excel-encoder/actions/workflows/phpunit.yml/badge.svg)](https://github.com/Ang3/php-excel-encoder/actions/workflows/phpunit.yml)
[![Symfony Integration](https://github.com/Ang3/php-excel-encoder/actions/workflows/symfony.yml/badge.svg)](https://github.com/Ang3/php-excel-encoder/actions/workflows/symfony.yml)
[![Latest Stable Version](https://poser.pugx.org/ang3/php-excel-encoder/v/stable)](https://packagist.org/packages/ang3/php-excel-encoder)
[![Total Downloads](https://poser.pugx.org/ang3/php-excel-encoder/downloads)](https://packagist.org/packages/ang3/php-excel-encoder)
[![Code Quality](https://github.com/assoconnect/php-excel-encoder/actions/workflows/build.yml/badge.svg)](https://github.com/assoconnect/php-excel-encoder/actions/workflows/build.yml)
[![Latest Stable Version](https://poser.pugx.org/assoconnect/php-excel-encoder/v/stable)](https://packagist.org/packages/assoconnect/php-excel-encoder)

Encode and decode xls/xlsx files and more thanks to the component
[phpoffice/phpspreadsheet](https://phpspreadsheet.readthedocs.io/en/latest/).
Expand All @@ -30,7 +27,7 @@ Installation
Open a command console and execute the following command to download the latest stable version of this bundle:

```shell
composer require ang3/php-excel-encoder
composer require assoconnect/php-excel-encoder
```

If you install this component outside of a Symfony application, you must require the vendor/autoload.php
Expand All @@ -52,7 +49,7 @@ Usage

require_once 'vendor/autoload.php';

use Ang3\Component\Serializer\Encoder\ExcelEncoder;
use assoconnect\Serializer\Encoder\ExcelEncoder;

// Create the encoder with default context
$encoder = new ExcelEncoder($defaultContext = []);
Expand Down Expand Up @@ -212,13 +209,13 @@ configure it as service by adding the contents below into the file `config/servi
# config/services.yaml
services:
# ...
Ang3\Component\Serializer\Encoder\ExcelEncoder: ~
AssoConnect\Serializer\Encoder\ExcelEncoder: ~
```

Run tests
---------

```$ git clone https://github.com/Ang3/php-excel-encoder.git```
```$ git clone https://github.com/assoconnect/php-excel-encoder.git```

```$ composer install```

Expand Down
26 changes: 18 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,42 @@
{
"name": "ang3/php-excel-encoder",
"name": "assoconnect/php-excel-encoder",
"type": "library",
"homepage": "https://github.com/Ang3/php-excel-encoder",
"homepage": "https://github.com/assoconnect/php-excel-encoder",
"description": "PHP Excel encoder",
"license": "MIT",
"authors": [
{
"name": "Joanis ROUANET",
"email": "joanis.ang3@gmail.com"
},
{
"name": "Florian GUIMIER",
"email": "florian.guimier@gmail.com"
}
],
"autoload": {
"psr-4": {
"Ang3\\Component\\Serializer\\Encoder\\": "src/"
"AssoConnect\\Serializer\\Encoder\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Ang3\\Component\\Serializer\\Encoder\\Tests\\": "tests/"
"AssoConnect\\Serializer\\Encoder\\Tests\\": "tests/"
}
},
"require": {
"php": ">=8.1",
"php": "^8.2",
"phpoffice/phpspreadsheet": "^1.16|^2.0",
"symfony/serializer": "^6.0",
"symfony/filesystem": "^6.0"
},
"require-dev": {
"symfony/test-pack": "^1.0"
},
"require-dev": {
"symfony/test-pack": "^1.0",
"assoconnect/php-quality-config": "^1.13"
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
Loading
Loading