Skip to content

Commit

Permalink
Merge pull request #74 from cbschuld/unit-testing-better-docs
Browse files Browse the repository at this point in the history
added unit testing, added better docs
  • Loading branch information
cbschuld authored Jun 26, 2019
2 parents 19878d6 + 43ef289 commit f48bdc9
Show file tree
Hide file tree
Showing 15 changed files with 5,633 additions and 85 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.idea
vendor
vendor
.phpunit.result.cache
/phpunit.xml
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ dist: precise
php:
- 7.3
- 7.2
- 5.6
- 5.5
- 5.4

install: composer install

script: phpunit --configuration phpunit.xml.dist

81 changes: 81 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project **attempts** to adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) while applying
changes when it socially makes sense.

## [Unreleased]

## [1.9.2] - 2019-06-26
### Added
- PHPUnit Tests for Firefox, Opera and Chrome (3684 tests, 7368 assertions)
- Stronger tests for Firefox and Chrome
### Removed
- Dropped support for 5.x PHP due to updates to PHPUnit and legacy nature of 5.X

## [1.9.1] - 2019-06-19
### Added
6/19/2019: Update (Version 1.9.1)
* Added Firefox iOS (gejobj)
* Corrected 'Vivalidi' to 'Vivaldi' (adaxi)
* Reset enhancement (yahasana)
* Enforce using precise distribution until End Of Life for Travis CI (bburnichon)
* Lazy load browser class on demand (bburnichon)

## 1.9.0 - 2010-08-20
### Added
* Added MSN Explorer Browser
* Added Bing/MSN Robot
* Added the Android Platform
### Fixed
* Fixed issue with Android 1.6/2.2

## 1.8.0 - 2010-04-27
## Fixed
* Added iPad support

## 1.7.0 - 2010-03-07
### Added
* Added FreeBSD Platform
* Added OpenBSD Platform
* Added NetBSD Platform
* Added SunOS Platform
* Added OpenSolaris Platform
* Added support of the Iceweazel Browser
* Added isChromeFrame() call to check if chromeframe is in use
* Moved the Opera check in front of the Firefox check due to legacy Opera User Agents
* Added the __toString() method (Thanks Deano)
## Removed
* Almost all of Gary's original code has been replaced
## Fixed
* Version 1.7 was a *MAJOR* Rebuild (preg_match and other *slow* routine removal(s)) included the following

## 0.0.9 - 2008-12-09
### Fixed
* removed an unused constant and renamed the constructor to use the PHP magic method __construct (thanks to Robin for locating the legacy constant and suggesting the use of the magic method).

## 0.0.8 - 2009-11-08
### Fixed
* A lot of changes to the script, thank you to everyone for the suggestions and emails. This release should add all of the requested features. Added BlackBerry, mobile detection, Opera Mini support, robot detection, Opera 10's UserAgent mess, detection for IceCat and Shiretoko!

## 0.0.7 - 2009-04-27
### Fixed
* John pointed out a terrible typo (see below) - removed the typo

## 0.0.6 - 2009-04-22
### Added
* added support for GoogleBot, the W3C Validator and Yahoo! Slurp

## 0.0.5 - 2009-03-14
### Added
* added support for the iPod; added iPod and iPhone as platforms; added Google.s Android

## 0.0.4 - 2009-02-24
### Fixed
* fixed typo in the usage! (thanks Adam!)

## 0.0.3 - 2009-02-19
### Fixed
* updated typical usage to show a correct example! (thanks David!)

50 changes: 0 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,53 +104,3 @@ if( $browser->getBrowser() == Browser::BROWSER_FIREFOX && $browser->getVersion()
}
```

12/9/2008 Update
* removed an unused constant and renamed the constructor to use the PHP magic method __construct (thanks to Robin for locating the legacy constant and suggesting the use of the magic method).

2/19/2009 Update
* updated typical usage to show a correct example! (thanks David!)

2/24/2009 Update
* fixed typo in the usage! (thanks Adam!)

3/14/2009 Update
* added support for the iPod; added iPod and iPhone as platforms; added Google.s Android

4/22/2009 Update
* added support for GoogleBot, the W3C Validator and Yahoo! Slurp

4/27/2009 Update
* John pointed out a terrible typo (see below) . removed the typo

11/08/2009 Update
* A lot of changes to the script, thank you to everyone for the suggestions and emails. This release should add all of the requested features. Added BlackBerry, mobile detection, Opera Mini support, robot detection, Opera 10.s UserAgent .mess., detection for IceCat and Shiretoko!

3/7/2010 Update
* Version 1.7 was a *MAJOR* Rebuild (preg_match and other .slow. routine removal(s)) included the following changes:
* Almost allof Gary.s original code has been replaced
* Large PHPUNIT testing environment created to validate new releases and additions
* Added FreeBSD Platform
* Added OpenBSD Platform
* Added NetBSD Platform
* Added SunOS Platform
* Added OpenSolaris Platform
* Added support of the Iceweazel Browser
* Added isChromeFrame() call to check if chromeframe is in use
* Moved the Opera check in front of the Firefox check due to legacy Opera User Agents
* Added the __toString() method (Thanks Deano)

4/27/2010: Update (Version 1.8)
* Added iPad support

8/20/2010: Update (Version 1.9)
* Added MSN Explorer Browser
* Added Bing/MSN Robot
* Added the Android Platform
* Fixed issue with Android 1.6/2.2

6/19/2019: Update (Version 1.9.1)
* Added Firefox iOS (gejobj)
* Corrected 'Vivalidi' to 'Vivaldi' (adaxi)
* Reset enhancement (yahasana)
* Enforce using precise distribution until End Of Life for Travis CI (bburnichon)
* Lazy load browser class on demand (bburnichon)
16 changes: 13 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{
"name": "cbschuld/browser.php",
"description": "A PHP Class to detect a user's Browser",
"keywords": ["browser", "user agent", "detection"],
"homepage": "http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php.html",
"keywords": [
"browser",
"user agent",
"detection"
],
"homepage": "https://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/",
"license": "MIT",
"authors": [
{
Expand All @@ -14,9 +18,15 @@
"autoload": {
"classmap": ["lib/Browser.php"]
},
"require": {
"php": ">=7.2"
},
"extra": {
"branch-alias": {
"dev-master": "1.9.x-dev"
}
},
"require-dev": {
"phpunit/phpunit": "^8"
}
}
}
Loading

0 comments on commit f48bdc9

Please sign in to comment.