]> git.andy128k.dev Git - ipf.git/commitdiff
Update dependencies
authorAndrey Kutejko <andy128k@gmail.com>
Thu, 18 Aug 2022 21:55:52 +0000 (23:55 +0200)
committerAndrey Kutejko <andy128k@gmail.com>
Thu, 18 Aug 2022 23:43:56 +0000 (01:43 +0200)
composer.json
composer.lock
ipf/error/500_debug.html
ipf/form/form.php
t/FormatTest.php [deleted file]
t/IPFFormatTest.php [new file with mode: 0644]

index 015732a105da449caf2c66e8a77284d0d1c19f89..aab5096559763f988b027dbfdbb4f9bc8a4355b5 100644 (file)
   },
   "require": {
     "psr/http-message": "~1.0",
-    "guzzlehttp/psr7": "^1",
-    "pear/archive_tar": "1.3.*",
+    "guzzlehttp/psr7": "^2",
+    "pear/archive_tar": "~1",
     "doctrine/dbal": "^2.5",
     "d11wtq/boris": "~1",
     "andy128k/missing-tools": "~0.3",
     "andy128k/pegp": "~0.2",
     "pimple/pimple": "^3.5",
-    "twig/twig": "~1",
+    "twig/twig": "~3",
     "http-interop/response-sender": "^1.0",
-    "dflydev/fig-cookies": "^1.0"
+    "dflydev/fig-cookies": "^3"
   },
   "require-dev": {
     "phpunit/phpunit": "~9"
index 8163528ce5d408c6f2ba2c8ba32b3052d73fb6c6..20841b35d016442057067ca390bb9589cdeee9d4 100644 (file)
@@ -4,28 +4,27 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "cf96606a06739e2726e9eec5c8de3b69",
+    "content-hash": "b7c0adb39516f441fbfee7a9f398637e",
     "packages": [
         {
             "name": "andy128k/missing-tools",
-            "version": "0.3.1",
+            "version": "0.3.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/andy128k/missing-tools.git",
-                "reference": "3a57b9cc3b43ac2485700dbc29859a128fee7e25"
+                "reference": "c6d390f6575ddba1a726bcaaf252c591dee1b8ec"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/andy128k/missing-tools/zipball/3a57b9cc3b43ac2485700dbc29859a128fee7e25",
-                "reference": "3a57b9cc3b43ac2485700dbc29859a128fee7e25",
+                "url": "https://api.github.com/repos/andy128k/missing-tools/zipball/c6d390f6575ddba1a726bcaaf252c591dee1b8ec",
+                "reference": "c6d390f6575ddba1a726bcaaf252c591dee1b8ec",
                 "shasum": ""
             },
             "require": {
-                "andy128k/pegp": "0.2",
-                "php": ">=5.6"
+                "andy128k/pegp": "~0.2"
             },
             "require-dev": {
-                "phpunit/phpunit": "~5"
+                "phpunit/phpunit": "~9"
             },
             "type": "library",
             "autoload": {
             "description": "Miscellaneous utilities",
             "support": {
                 "issues": "https://github.com/andy128k/missing-tools/issues",
-                "source": "https://github.com/andy128k/missing-tools/tree/0.3.1"
+                "source": "https://github.com/andy128k/missing-tools/tree/0.3.3"
             },
-            "time": "2019-04-30T08:57:25+00:00"
+            "time": "2022-08-18T21:13:56+00:00"
         },
         {
             "name": "andy128k/pegp",
-            "version": "0.2",
+            "version": "0.2.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/andy128k/pegp.git",
-                "reference": "7f4c5a065dec027c4362d346dc7b3995ddb3067f"
+                "reference": "165b79f53d35dce1cf4fdbb68c8cd4d522989139"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/andy128k/pegp/zipball/7f4c5a065dec027c4362d346dc7b3995ddb3067f",
-                "reference": "7f4c5a065dec027c4362d346dc7b3995ddb3067f",
+                "url": "https://api.github.com/repos/andy128k/pegp/zipball/165b79f53d35dce1cf4fdbb68c8cd4d522989139",
+                "reference": "165b79f53d35dce1cf4fdbb68c8cd4d522989139",
                 "shasum": ""
             },
-            "require": {
-                "php": ">=5.6"
-            },
             "require-dev": {
-                "phpunit/phpunit": "~8"
+                "phpunit/phpunit": "~9"
             },
             "type": "library",
             "autoload": {
@@ -89,9 +85,9 @@
             "description": "Library to construct PEG parsers",
             "support": {
                 "issues": "https://github.com/andy128k/pegp/issues",
-                "source": "https://github.com/andy128k/pegp/tree/master"
+                "source": "https://github.com/andy128k/pegp/tree/0.2.1"
             },
-            "time": "2019-03-17T13:12:33+00:00"
+            "time": "2022-08-18T21:06:49+00:00"
         },
         {
             "name": "d11wtq/boris",
         },
         {
             "name": "dflydev/fig-cookies",
-            "version": "v1.0.2",
+            "version": "v3.0.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/dflydev/dflydev-fig-cookies.git",
-                "reference": "883233c159d00d39e940bd12cfe42c0d23420c1c"
+                "reference": "ea6934204b1b34ffdf5130dc7e0928d18ced2498"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/dflydev/dflydev-fig-cookies/zipball/883233c159d00d39e940bd12cfe42c0d23420c1c",
-                "reference": "883233c159d00d39e940bd12cfe42c0d23420c1c",
+                "url": "https://api.github.com/repos/dflydev/dflydev-fig-cookies/zipball/ea6934204b1b34ffdf5130dc7e0928d18ced2498",
+                "reference": "ea6934204b1b34ffdf5130dc7e0928d18ced2498",
                 "shasum": ""
             },
             "require": {
-                "php": ">=5.4",
-                "psr/http-message": "~1.0"
+                "ext-pcre": "*",
+                "php": "^7.2 || ^8.0",
+                "psr/http-message": "^1"
             },
             "require-dev": {
-                "codeclimate/php-test-reporter": "~0.1@dev",
-                "phpunit/phpunit": "~4.5",
-                "squizlabs/php_codesniffer": "~2.3"
+                "doctrine/coding-standard": "^8",
+                "phpstan/extension-installer": "^1.0",
+                "phpstan/phpstan": "^0.12",
+                "phpstan/phpstan-phpunit": "^0.12.16",
+                "phpunit/phpunit": "^7.2.6 || ^9",
+                "scrutinizer/ocular": "^1.8",
+                "squizlabs/php_codesniffer": "^3.3",
+                "vimeo/psalm": "^4.4"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.0.x-dev"
+                    "dev-main": "3.0.x-dev"
                 }
             },
             "autoload": {
             ],
             "support": {
                 "issues": "https://github.com/dflydev/dflydev-fig-cookies/issues",
-                "source": "https://github.com/dflydev/dflydev-fig-cookies/tree/master"
+                "source": "https://github.com/dflydev/dflydev-fig-cookies/tree/v3.0.0"
             },
-            "time": "2016-03-28T09:10:18+00:00"
+            "time": "2021-01-22T02:53:56+00:00"
         },
         {
             "name": "doctrine/cache",
         },
         {
             "name": "guzzlehttp/psr7",
-            "version": "1.9.0",
+            "version": "2.4.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/guzzle/psr7.git",
-                "reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318"
+                "reference": "13388f00956b1503577598873fffb5ae994b5737"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/psr7/zipball/e98e3e6d4f86621a9b75f623996e6bbdeb4b9318",
-                "reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318",
+                "url": "https://api.github.com/repos/guzzle/psr7/zipball/13388f00956b1503577598873fffb5ae994b5737",
+                "reference": "13388f00956b1503577598873fffb5ae994b5737",
                 "shasum": ""
             },
             "require": {
-                "php": ">=5.4.0",
-                "psr/http-message": "~1.0",
-                "ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
+                "php": "^7.2.5 || ^8.0",
+                "psr/http-factory": "^1.0",
+                "psr/http-message": "^1.0",
+                "ralouphie/getallheaders": "^3.0"
             },
             "provide": {
+                "psr/http-factory-implementation": "1.0",
                 "psr/http-message-implementation": "1.0"
             },
             "require-dev": {
-                "ext-zlib": "*",
-                "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10"
+                "bamarni/composer-bin-plugin": "^1.4.1",
+                "http-interop/http-factory-tests": "^0.9",
+                "phpunit/phpunit": "^8.5.8 || ^9.3.10"
             },
             "suggest": {
                 "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.9-dev"
+                    "dev-master": "2.4-dev"
                 }
             },
             "autoload": {
-                "files": [
-                    "src/functions_include.php"
-                ],
                 "psr-4": {
                     "GuzzleHttp\\Psr7\\": "src/"
                 }
                     "name": "Tobias Schultze",
                     "email": "webmaster@tubo-world.de",
                     "homepage": "https://github.com/Tobion"
+                },
+                {
+                    "name": "Márk Sági-Kazár",
+                    "email": "mark.sagikazar@gmail.com",
+                    "homepage": "https://sagikazarmark.hu"
                 }
             ],
             "description": "PSR-7 message implementation that also provides common utility methods",
             ],
             "support": {
                 "issues": "https://github.com/guzzle/psr7/issues",
-                "source": "https://github.com/guzzle/psr7/tree/1.9.0"
+                "source": "https://github.com/guzzle/psr7/tree/2.4.0"
             },
             "funding": [
                 {
                     "type": "tidelift"
                 }
             ],
-            "time": "2022-06-20T21:43:03+00:00"
+            "time": "2022-06-20T21:43:11+00:00"
         },
         {
             "name": "http-interop/response-sender",
         },
         {
             "name": "pear/archive_tar",
-            "version": "1.3.16",
+            "version": "1.4.14",
             "source": {
                 "type": "git",
                 "url": "https://github.com/pear/Archive_Tar.git",
-                "reference": "fd358553f84a4587ad38f6da98936af494dda94b"
+                "reference": "4d761c5334c790e45ef3245f0864b8955c562caa"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/pear/Archive_Tar/zipball/fd358553f84a4587ad38f6da98936af494dda94b",
-                "reference": "fd358553f84a4587ad38f6da98936af494dda94b",
+                "url": "https://api.github.com/repos/pear/Archive_Tar/zipball/4d761c5334c790e45ef3245f0864b8955c562caa",
+                "reference": "4d761c5334c790e45ef3245f0864b8955c562caa",
                 "shasum": ""
             },
             "require": {
-                "pear/pear-core-minimal": "^1.9.5",
-                "php": ">=4.3.0"
+                "pear/pear-core-minimal": "^1.10.0alpha2",
+                "php": ">=5.2.0"
             },
             "require-dev": {
                 "phpunit/phpunit": "*"
             },
             "suggest": {
-                "ext-bz2": "bz2 compression support.",
-                "ext-xz": "lzma2 compression support.",
+                "ext-bz2": "Bz2 compression support.",
+                "ext-xz": "Lzma2 compression support.",
                 "ext-zlib": "Gzip compression support."
             },
             "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.4.x-dev"
+                }
+            },
             "autoload": {
                 "psr-0": {
                     "Archive_Tar": ""
                     "email": "mrook@php.net"
                 }
             ],
-            "description": "Tar file management class",
+            "description": "Tar file management class with compression support (gzip, bzip2, lzma2)",
             "homepage": "https://github.com/pear/Archive_Tar",
             "keywords": [
                 "archive",
                 "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=Archive_Tar",
                 "source": "https://github.com/pear/Archive_Tar"
             },
-            "time": "2015-04-14T12:24:20+00:00"
+            "funding": [
+                {
+                    "url": "https://github.com/mrook",
+                    "type": "github"
+                },
+                {
+                    "url": "https://www.patreon.com/michielrook",
+                    "type": "patreon"
+                }
+            ],
+            "time": "2021-07-20T13:53:39+00:00"
         },
         {
             "name": "pear/console_getopt",
             },
             "time": "2021-11-05T16:47:00+00:00"
         },
+        {
+            "name": "psr/http-factory",
+            "version": "1.0.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/php-fig/http-factory.git",
+                "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be",
+                "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.0.0",
+                "psr/http-message": "^1.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Psr\\Http\\Message\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "PHP-FIG",
+                    "homepage": "http://www.php-fig.org/"
+                }
+            ],
+            "description": "Common interfaces for PSR-7 HTTP message factories",
+            "keywords": [
+                "factory",
+                "http",
+                "message",
+                "psr",
+                "psr-17",
+                "psr-7",
+                "request",
+                "response"
+            ],
+            "support": {
+                "source": "https://github.com/php-fig/http-factory/tree/master"
+            },
+            "time": "2019-04-30T12:38:16+00:00"
+        },
         {
             "name": "psr/http-message",
             "version": "1.0.1",
             ],
             "time": "2022-05-24T11:49:31+00:00"
         },
+        {
+            "name": "symfony/polyfill-mbstring",
+            "version": "v1.26.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/polyfill-mbstring.git",
+                "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
+                "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.1"
+            },
+            "provide": {
+                "ext-mbstring": "*"
+            },
+            "suggest": {
+                "ext-mbstring": "For best performance"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-main": "1.26-dev"
+                },
+                "thanks": {
+                    "name": "symfony/polyfill",
+                    "url": "https://github.com/symfony/polyfill"
+                }
+            },
+            "autoload": {
+                "files": [
+                    "bootstrap.php"
+                ],
+                "psr-4": {
+                    "Symfony\\Polyfill\\Mbstring\\": ""
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony polyfill for the Mbstring extension",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "compatibility",
+                "mbstring",
+                "polyfill",
+                "portable",
+                "shim"
+            ],
+            "support": {
+                "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0"
+            },
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2022-05-24T11:49:31+00:00"
+        },
         {
             "name": "twig/twig",
-            "version": "v1.44.6",
+            "version": "v3.4.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/twigphp/Twig.git",
-                "reference": "ae39480f010ef88adc7938503c9b02d3baf2f3b3"
+                "reference": "e07cdd3d430cd7e453c31b36eb5ad6c0c5e43077"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/twigphp/Twig/zipball/ae39480f010ef88adc7938503c9b02d3baf2f3b3",
-                "reference": "ae39480f010ef88adc7938503c9b02d3baf2f3b3",
+                "url": "https://api.github.com/repos/twigphp/Twig/zipball/e07cdd3d430cd7e453c31b36eb5ad6c0c5e43077",
+                "reference": "e07cdd3d430cd7e453c31b36eb5ad6c0c5e43077",
                 "shasum": ""
             },
             "require": {
                 "php": ">=7.2.5",
-                "symfony/polyfill-ctype": "^1.8"
+                "symfony/polyfill-ctype": "^1.8",
+                "symfony/polyfill-mbstring": "^1.3"
             },
             "require-dev": {
                 "psr/container": "^1.0",
-                "symfony/phpunit-bridge": "^4.4.9|^5.0.9"
+                "symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.44-dev"
+                    "dev-master": "3.4-dev"
                 }
             },
             "autoload": {
-                "psr-0": {
-                    "Twig_": "lib/"
-                },
                 "psr-4": {
                     "Twig\\": "src/"
                 }
             ],
             "support": {
                 "issues": "https://github.com/twigphp/Twig/issues",
-                "source": "https://github.com/twigphp/Twig/tree/v1.44.6"
+                "source": "https://github.com/twigphp/Twig/tree/v3.4.2"
             },
             "funding": [
                 {
                     "type": "tidelift"
                 }
             ],
-            "time": "2021-11-25T13:31:46+00:00"
+            "time": "2022-08-12T06:47:24+00:00"
         }
     ],
     "packages-dev": [
index 60c09426908a24e7b05f9d3ea68aed0aaa873e61..a36e2e79bf22bee1bbac6d09132f06ac7ffee173 100644 (file)
@@ -111,7 +111,7 @@ $frames = $this->frames($this->exception);
         <h2><?php echo $frame['func'] ? $frame['func'] : 'No function' ?></h2>
         <h3><?php echo $frame['file'].' at '.$frame['line'] ?></h3>
 
-        <?php echo is_readable($frame['file']) ? $this->sourceFile($frame['file'], $frame['line']) : '' ?>
+        <?php echo $frame['file'] && is_readable($frame['file']) ? $this->sourceFile($frame['file'], $frame['line']) : '' ?>
 
         <?php $this->values('Arguments', $frame['args']) ?>
       </div>
index acfc2e076032517c16ead37dc01c978551b2fac0..c812c43ff9ccd568d8e4d9e212c43a45a318c87a 100644 (file)
@@ -207,28 +207,28 @@ abstract class IPF_Form implements Iterator
         return new IPF_Form_BoundField($this, $this->fields[$key], $key);
     }
 
-    public function current()
+    public function current(): mixed
     {
         $name = key($this->fields);
         return $this->field($name);
     }
 
-    public function key()
+    public function key(): mixed
     {
         return key($this->fields);
     }
 
-    public function next()
+    public function next(): void
     {
         next($this->fields);
     }
 
-    public function rewind()
+    public function rewind(): void
     {
         reset($this->fields);
     }
 
-    public function valid()
+    public function valid(): bool
     {
         return (false !== current($this->fields));
     }
diff --git a/t/FormatTest.php b/t/FormatTest.php
deleted file mode 100644 (file)
index a965442..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-
-class FormatTest extends \PHPUnit\Framework\TestCase
-{
-    public function testFlags()
-    {
-        $this->assertEquals(IPF_Format::DATE_DEFAULT,  IPF_Format::DATE_BIG_ENDIAN    | IPF_Format::DATE_HYPHENS);
-        $this->assertEquals(IPF_Format::DATE_US,       IPF_Format::DATE_MIDDLE_ENDIAN | IPF_Format::DATE_SLASHES);
-        $this->assertEquals(IPF_Format::DATE_EUROPEAN, IPF_Format::DATE_LITTLE_ENDIAN | IPF_Format::DATE_DOTS);
-    }
-
-    public function testDateFlagsFromString()
-    {
-        $this->assertEquals(IPF_Format::DATE_DEFAULT,  IPF_Format::dateFlagsFromString('Default'));
-        $this->assertEquals(IPF_Format::DATE_DEFAULT,  IPF_Format::dateFlagsFromString('Big-endian hyphEns'));
-        $this->assertEquals(IPF_Format::DATE_EUROPEAN, IPF_Format::dateFlagsFromString('European'));
-        $this->assertEquals(IPF_Format::DATE_EUROPEAN, IPF_Format::dateFlagsFromString('little-endian dots'));
-        $this->assertEquals(IPF_Format::DATE_US,       IPF_Format::dateFlagsFromString('US'));
-        $this->assertEquals(IPF_Format::DATE_US,       IPF_Format::dateFlagsFromString('Middle-Endian Slashes'));
-        $this->assertEquals(IPF_Format::DATE_BIG_ENDIAN | IPF_Format::DATE_SPACES,
-                                                       IPF_Format::dateFlagsFromString('big-endian spaces'));
-    }
-
-    public function testDatetimeFlagsFromString()
-    {
-        $this->assertEquals(IPF_Format::DATETIME_DEFAULT,  IPF_Format::datetimeFlagsFromString('Default'));
-        $this->assertEquals(IPF_Format::DATETIME_DEFAULT,  IPF_Format::datetimeFlagsFromString('Big-endian hyphEns 24'));
-        $this->assertEquals(IPF_Format::DATETIME_EUROPEAN, IPF_Format::datetimeFlagsFromString('European'));
-        $this->assertEquals(IPF_Format::DATETIME_EUROPEAN, IPF_Format::datetimeFlagsFromString('little-endian dots 24'));
-        $this->assertEquals(IPF_Format::DATETIME_US,       IPF_Format::datetimeFlagsFromString('US'));
-        $this->assertEquals(IPF_Format::DATETIME_US,       IPF_Format::datetimeFlagsFromString('Middle-Endian Slashes 12-upper'));
-        $this->assertEquals(IPF_Format::DATE_BIG_ENDIAN | IPF_Format::DATE_SPACES | IPF_Format::TIME_12HOURS_LOWER | IPF_Format::TIME_SECONDS,
-                                                           IPF_Format::datetimeFlagsFromString("big-endian spaces \n 12-lower Seconds"));
-    }
-}
diff --git a/t/IPFFormatTest.php b/t/IPFFormatTest.php
new file mode 100644 (file)
index 0000000..db1e2b4
--- /dev/null
@@ -0,0 +1,35 @@
+<?php
+
+class IPFFormatTest extends \PHPUnit\Framework\TestCase
+{
+    public function testFlags()
+    {
+        $this->assertEquals(IPF_Format::DATE_DEFAULT,  IPF_Format::DATE_BIG_ENDIAN    | IPF_Format::DATE_HYPHENS);
+        $this->assertEquals(IPF_Format::DATE_US,       IPF_Format::DATE_MIDDLE_ENDIAN | IPF_Format::DATE_SLASHES);
+        $this->assertEquals(IPF_Format::DATE_EUROPEAN, IPF_Format::DATE_LITTLE_ENDIAN | IPF_Format::DATE_DOTS);
+    }
+
+    public function testDateFlagsFromString()
+    {
+        $this->assertEquals(IPF_Format::DATE_DEFAULT,  IPF_Format::dateFlagsFromString('Default'));
+        $this->assertEquals(IPF_Format::DATE_DEFAULT,  IPF_Format::dateFlagsFromString('Big-endian hyphEns'));
+        $this->assertEquals(IPF_Format::DATE_EUROPEAN, IPF_Format::dateFlagsFromString('European'));
+        $this->assertEquals(IPF_Format::DATE_EUROPEAN, IPF_Format::dateFlagsFromString('little-endian dots'));
+        $this->assertEquals(IPF_Format::DATE_US,       IPF_Format::dateFlagsFromString('US'));
+        $this->assertEquals(IPF_Format::DATE_US,       IPF_Format::dateFlagsFromString('Middle-Endian Slashes'));
+        $this->assertEquals(IPF_Format::DATE_BIG_ENDIAN | IPF_Format::DATE_SPACES,
+                                                       IPF_Format::dateFlagsFromString('big-endian spaces'));
+    }
+
+    public function testDatetimeFlagsFromString()
+    {
+        $this->assertEquals(IPF_Format::DATETIME_DEFAULT,  IPF_Format::datetimeFlagsFromString('Default'));
+        $this->assertEquals(IPF_Format::DATETIME_DEFAULT,  IPF_Format::datetimeFlagsFromString('Big-endian hyphEns 24'));
+        $this->assertEquals(IPF_Format::DATETIME_EUROPEAN, IPF_Format::datetimeFlagsFromString('European'));
+        $this->assertEquals(IPF_Format::DATETIME_EUROPEAN, IPF_Format::datetimeFlagsFromString('little-endian dots 24'));
+        $this->assertEquals(IPF_Format::DATETIME_US,       IPF_Format::datetimeFlagsFromString('US'));
+        $this->assertEquals(IPF_Format::DATETIME_US,       IPF_Format::datetimeFlagsFromString('Middle-Endian Slashes 12-upper'));
+        $this->assertEquals(IPF_Format::DATE_BIG_ENDIAN | IPF_Format::DATE_SPACES | IPF_Format::TIME_12HOURS_LOWER | IPF_Format::TIME_SECONDS,
+                                                           IPF_Format::datetimeFlagsFromString("big-endian spaces \n 12-lower Seconds"));
+    }
+}