Skip to content

Commit

Permalink
shim for JsonSerializable
Browse files Browse the repository at this point in the history
  • Loading branch information
danomatic committed Apr 10, 2017
1 parent b6b705a commit c6fddd7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
"phpunit/phpunit": "4.8.*"
},
"autoload": {
"files": [
"src/shim/JsonSerializable.php"
],
"psr-4": {
"Dabl\\Orm\\": "src"
}
Expand Down
13 changes: 13 additions & 0 deletions src/shim/JsonSerializable.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

if (!interface_exists('JsonSerializable')) {

/**
* Polyfill for JsonSerializable
*/
interface JsonSerializable {

public function jsonSerialize();
}

}

0 comments on commit c6fddd7

Please sign in to comment.