### Updating Mobile Detect Website Source: https://github.com/serbanghita/mobile-detect/blob/4.8.x/CONTRIBUTING.md Steps to contribute to the Mobile Detect official website, including checking out the gh-pages branch, installing browser-sync, and running a local server for development. ```bash git checkout gh-pages npm install -g browser-sync browser-sync start --s . --f . --port 3000 --reload-debounce 1500 --no-ui ``` -------------------------------- ### Building Mobile Detect Project Source: https://github.com/serbanghita/mobile-detect/blob/4.8.x/CONTRIBUTING.md Commands to build the Mobile Detect project, including installing dependencies locally using Composer or via Docker CLI/Compose for containerized environments. ```shell composer install ``` ```shell DOCKER_BUILDKIT=0 docker build -f ./docker/Dockerfile -t build . ``` ```shell docker compose build setup ``` -------------------------------- ### Creating a Local Git Branch for Mobile Detect Source: https://github.com/serbanghita/mobile-detect/blob/4.8.x/CONTRIBUTING.md Guide to creating a new local working branch from an existing Mobile Detect branch (4.x, 3.x, or 2.x) depending on your PHP version. ```bash git checkout -b my-new-patch origin/x.x.x ``` -------------------------------- ### Running Mobile Detect Unit and Integration Tests Source: https://github.com/serbanghita/mobile-detect/blob/4.8.x/CONTRIBUTING.md Instructions to execute unit and integration tests for Mobile Detect, ensuring code changes maintain high coverage. New methods require new tests. ```bash vendor/bin/phpunit -v -c tests/phpunit.xml --coverage-html .coverage ``` ```shell docker compose run runUnitTests ``` -------------------------------- ### Running Mobile Detect Performance Tests Source: https://github.com/serbanghita/mobile-detect/blob/4.8.x/CONTRIBUTING.md Commands to run performance benchmarks for Mobile Detect, including baseline re-creation, to ensure optimal library performance. ```bash ./vendor/bin/phpbench run tests/Benchmark/MobileDetectBench.php --ref=baseline --retry-threshold=1 --iterations=10 --revs=1000 --report=aggregate ``` ```shell docker compose run runPerfTests ``` ```bash ./vendor/bin/phpbench run tests/Benchmark/ --retry-threshold=1 --iterations=10 --revs=1000 --report=aggregate --tag=baseline --dump-file=phpbench-baseline.xml ``` -------------------------------- ### Forking and Cloning Mobile Detect Repository Source: https://github.com/serbanghita/mobile-detect/blob/4.8.x/CONTRIBUTING.md Instructions to clone your forked Mobile Detect repository and add the upstream remote for future synchronization with the main project. ```bash git clone https://github.com/[yourname]/Mobile-Detect.git git add remote serbanghita https://github.com/serbanghita/Mobile-Detect.git git remote -v ``` -------------------------------- ### Committing Changes to Mobile Detect Source: https://github.com/serbanghita/mobile-detect/blob/4.8.x/CONTRIBUTING.md Standard Git commands to check status, stage, commit, and push local changes to your forked Mobile Detect repository after successful testing. ```bash git status git stage git commit -m "your commit message here" git push ``` -------------------------------- ### Linting Mobile Detect Code Source: https://github.com/serbanghita/mobile-detect/blob/4.8.x/CONTRIBUTING.md Commands to ensure code quality and adherence to coding standards by running PHP Code Sniffer locally or using Docker Compose for linting. ```bash ./vendor/bin/phpcs ./vendor/bin/phpcbf ``` ```shell docker compose build runLinting ``` -------------------------------- ### Run PHPUnit Tests for Mobile Detect Source: https://github.com/serbanghita/mobile-detect/blob/4.8.x/README.md This command executes the PHPUnit test suite for the Mobile Detect library. It runs tests verbosely, uses the specified `phpunit.xml` configuration file, and generates an HTML code coverage report in the current directory. ```Bash vendor/bin/phpunit -v -c tests/phpunit.xml --coverage-html .coverage ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.