Skip to content

Commit

Permalink
Merge pull request #57 from andreaselia/fix-l11
Browse files Browse the repository at this point in the history
Copy over Agent functionality to allow Laravel 11 Support
  • Loading branch information
tomirons authored Apr 1, 2024
2 parents 4b8c2a5 + 2ed9eb6 commit a1cee39
Show file tree
Hide file tree
Showing 13 changed files with 740 additions and 70 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/vendor
/.phpunit.cache
composer.lock
.phpunit.result.cache
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"illuminate/collections": "^8.0|^9.0|^10.0|^11.0",
"illuminate/http": "^8.0|^9.0|^10.0|^11.0",
"illuminate/view": "^8.0|^9.0|^10.0|^11.0",
"jenssegers/agent": "^2.6"
"mobiledetect/mobiledetectlib": "^2.7.6",
"jaybizzle/crawler-detect": "^1.2"
},
"autoload": {
"psr-4": {
Expand Down
6 changes: 3 additions & 3 deletions database/factories/PageViewFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ public function definition()
{
return [
'session' => $this->faker->unique()->md5(),
'uri' => '/'.$this->faker->unique()->word(),
'source' => 'example.com',
'uri' => '/'.$this->faker->unique()->word(),
'source' => 'example.com',
'country' => 'us',
'browser' => 'chrome',
'device' => 'desktop',
'device' => 'desktop',
];
}
}
19 changes: 8 additions & 11 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,13 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
bootstrap="vendor/autoload.php"
backupGlobals="false"
backupStaticAttributes="false"
colors="true"
verbose="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.0/phpunit.xsd"
cacheDirectory=".phpunit.cache"
backupStaticProperties="false"
>
<coverage>
<include>
<directory suffix=".php">src/</directory>
</include>
</coverage>
<testsuites>
<testsuite name="Unit">
<directory suffix="Test.php">./tests/Unit</directory>
Expand All @@ -31,4 +23,9 @@
<env name="APP_KEY" value="AckfSECXIvnK5r28GVIWUAxmbBSjTsmF"/>
<env name="DB_CONNECTION" value="testing"/>
</php>
<source>
<include>
<directory suffix=".php">src/</directory>
</include>
</source>
</phpunit>
Loading

0 comments on commit a1cee39

Please sign in to comment.