PHP code example of sclable / xml-lint

1. Go to this page and download the library: Download sclable/xml-lint library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sclable / xml-lint example snippets

shell
# check code style
php tools/php-cs-fixer/vendor/bin/php-cs-fixer fix --dry-run -v

# run tests
php vendor/bin/phpunit
php vendor/bin/behat
shell
# Example
docker build -t xml-lint:php-8.4 --build-arg=PHP_VERSION="8.4" .

# PHP_VERSION: choose between 8.1, 8.2, 8.3 and 8.4
docker build -t xml-lint:php-8.1 --build-arg=PHP_VERSION="8.1" .
docker build -t xml-lint:php-8.2 --build-arg=PHP_VERSION="8.2" .
docker build -t xml-lint:php-8.3 --build-arg=PHP_VERSION="8.3" .
docker build -t xml-lint:php-8.4 --build-arg=PHP_VERSION="8.4" .

# Run with code style check
docker build -t xml-lint:php-8.4 --build-arg=PHP_VERSION="8.4" --build-arg=PHP_CS_FIXER=true .

# Use this image to run xml-lint:
cd tests/functional/_testdata
docker run -it --rm -v "$PWD":/var/src -w /var/src xml-lint:php-8.4 -r -v -- ./