diff --git a/.travis.yml b/.travis.yml index bd0c42765..7e74b3f5a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,24 +7,25 @@ branches: services: - docker before_install: - - curl -L https://github.com/docker/compose/releases/download/1.7.1/docker-compose-`uname - -s`-`uname -m` > docker-compose + - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose - chmod +x docker-compose - sudo mv docker-compose /usr/local/bin - date=`date +%Y%m%d%H%M%S` && branch=${TRAVIS_BRANCH} && rev=`git rev-parse --short=6 HEAD` && sed -i "s/\$1/\$1.$date.$branch.$rev/g" deployment.json script: - - docker run --rm -v $(pwd):/app composer/composer install - - docker run --rm -v $(pwd):/app -w /app lucor/php7-cli php bin/install.php translations - develop + - docker run --rm -v $(pwd):/app jekkos/composer composer install + - docker run --rm -v $(pwd):/app jekkos/composer php bin/install.php translations develop - sed -i "s/'\(dev\)'/'$rev'/g" application/config/config.php - docker run --rm -it -v $(pwd):/app -w /app digitallyseamless/nodejs-bower-grunt sh -c "npm install && bower install && grunt package" - - /bin/bash docker/install-local.sh + - docker-compose build + - docker-compose -f docker-compose.test.yml up --abort-on-container-exit env: - - TAG=$(echo ${TRAVIS_BRANCH} | sed s/feature\\///) -after_success: '[ -n ${DOCKER_USERNAME} ] && docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" - && docker tag "opensourcepos_ospos:latest" "jekkos/opensourcepos:$TAG" && docker push "jekkos/opensourcepos:$TAG"' + global: + - DOCKER_COMPOSE_VERSION=1.21.1 + - TAG=$(echo ${TRAVIS_BRANCH} | sed s/feature\\///) +after_success: + - 'docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" && docker tag "opensourcepos_ospos:latest" "jekkos/opensourcepos:$TAG" && docker push "jekkos/opensourcepos:$TAG"' deploy: file: deployment.json provider: bintray diff --git a/Dockerfile b/Dockerfile index 9ce8d8091..ba6f825ca 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:7.3-apache +FROM php:7.3-apache AS ospos MAINTAINER jekkos RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ @@ -16,4 +16,26 @@ COPY . /app RUN ln -s /app/*[^public] /var/www && rm -rf /var/www/html && ln -nsf /app/public /var/www/html RUN chmod 755 /app/public/uploads && chown -R www-data:www-data /app/public /app/application -RUN [ ! -f test/ospos.js ] || sed -i -e "s/\(localhost\)/web/g" test/ospos.js +FROM ospos AS ospos_test + +COPY --from=composer /usr/bin/composer /usr/bin/composer + +RUN apt-get install -y libzip-dev wget +RUN wget https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh -O /bin/wait-for-it.sh && chmod +x /bin/wait-for-it.sh +RUN docker-php-ext-install zip +RUN composer install -d/app +RUN php /app/vendor/kenjis/ci-phpunit-test/install.php -a /app/application -p /app/vendor/codeigniter/framework +RUN sed -i 's/backupGlobals="true"/backupGlobals="false"/g' /app/application/tests/phpunit.xml +RUN sed -i '13,17d' /app/application/tests/controllers/Welcome_test.php +WORKDIR /app/application/tests + +CMD ["/app/vendor/phpunit/phpunit/phpunit"] + +FROM ospos AS ospos_dev + +RUN mkdir -p /app/bower_components && ln -s /app/bower_components /var/www/html/bower_components +RUN yes | pecl install xdebug \ + && echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \ + && echo "xdebug.remote_enable=on" >> /usr/local/etc/php/conf.d/xdebug.ini \ + && echo "xdebug.remote_autostart=off" >> /usr/local/etc/php/conf.d/xdebug.ini + diff --git a/Dockerfile.dev b/Dockerfile.dev deleted file mode 100644 index 9d09afd74..000000000 --- a/Dockerfile.dev +++ /dev/null @@ -1,9 +0,0 @@ -FROM jekkos/opensourcepos:master -MAINTAINER jekkos - -RUN mkdir -p /app/bower_components && ln -s /app/bower_components /var/www/html/bower_components -RUN yes | pecl install xdebug \ - && echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \ - && echo "xdebug.remote_enable=on" >> /usr/local/etc/php/conf.d/xdebug.ini \ - && echo "xdebug.remote_autostart=off" >> /usr/local/etc/php/conf.d/xdebug.ini - diff --git a/Dockerfile.test b/Dockerfile.test deleted file mode 100644 index 93b72144e..000000000 --- a/Dockerfile.test +++ /dev/null @@ -1,11 +0,0 @@ -FROM digitallyseamless/nodejs-bower-grunt:5 -MAINTAINER jekkos - -# apt-get install curl - -COPY Gruntfile.js . -COPY package.json . -COPY test . -RUN npm install - -CMD ['while ! curl web/index.php | grep username; do sleep 1; done; grunt mochaWebdriver:test'] diff --git a/Gruntfile.js b/Gruntfile.js index 9153c5a37..112352b0e 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -230,7 +230,25 @@ module.exports = function(grunt) { archive: 'dist/opensourcepos.zip' }, files: [ - {src: ['public/**', 'vendor/**', 'application/**', '!/public/images/menubar/png/', '!/public/dist/bootswatch/', '/public/dist/bootswatch/*/*.css', 'database/**', '*.txt', '*.md', 'LICENSE', 'docker*', 'Dockerfile', '**/.htaccess', '*.csv']} + { + src: [ + 'public/**', + 'vendor/**', + 'application/**', + '!/application/tests', + '!/public/images/menubar/png/', + '!/public/dist/bootswatch/', + '/public/dist/bootswatch/*/*.css', + 'database/**', + '*.txt', + '*.md', + 'LICENSE', + 'docker*', + 'Dockerfile', + '**/.htaccess', + '*.csv' + ] + } ] } } diff --git a/INSTALL.md b/INSTALL.md index 0b914299b..08495fa2f 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -98,7 +98,7 @@ Cloud install ------------- If you choose *DigitalOcean*: -[Through this link](https://m.do.co/c/ac38c262507b), you will get a *$50 credit* for a first month. [Check the wiki](https://github.com/opensourcepos/opensourcepos/wiki/DOCS-USERS-Getting-Started-installations#cloud-deploy-installation) for further instructions on how to install the necessary components. +[Through this link](https://m.do.co/c/ac38c262507b), you will get a *$100 credit* for a first month. [Check the wiki](https://github.com/opensourcepos/opensourcepos/wiki/Getting-Started-installations) for further instructions on how to install the necessary components. cPanel & SSH Install diff --git a/application/config/config.php b/application/config/config.php index 9050e1b74..ff873a9c0 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -66,7 +66,7 @@ $config['db_log_enabled'] = FALSE; | */ $config['base_url'] = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') || (isset($_ENV['FORCE_HTTPS']) && $_ENV['FORCE_HTTPS'] == 'true')) ? 'https' : 'http'; -$config['base_url'] .= '://' . $_SERVER['HTTP_HOST']; +$config['base_url'] .= '://' . ((isset($_SERVER['HTTP_HOST'])) ? $_SERVER['HTTP_HOST'] : 'localhost') ; $config['base_url'] .= str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']); /* diff --git a/application/config/hooks.php b/application/config/hooks.php index 37e9d3ccc..dfc36793c 100644 --- a/application/config/hooks.php +++ b/application/config/hooks.php @@ -27,7 +27,7 @@ $hook['post_controller'] = array( ); $hook['pre_system'] = function() { - $config_path = APPPATH . 'config/'; + $config_path = APPPATH . (ENVIRONMENT == 'testing') ? 'tests/' : 'config/'; try { $dotenv = new Dotenv\Dotenv($config_path); $dotenv->overload(); diff --git a/application/controllers/Employees.php b/application/controllers/Employees.php index 8be38df9f..957167f26 100644 --- a/application/controllers/Employees.php +++ b/application/controllers/Employees.php @@ -37,7 +37,7 @@ class Employees extends Persons */ public function suggest() { - $suggestions = $this->xss_clean($this->Employee->get_search_suggestions($this->input->post('term'), TRUE)); + $suggestions = $this->xss_clean($this->Employee->get_search_suggestions($this->input->get('term'), TRUE)); echo json_encode($suggestions); } diff --git a/application/controllers/Sales.php b/application/controllers/Sales.php index 26cfee789..534f329cf 100644 --- a/application/controllers/Sales.php +++ b/application/controllers/Sales.php @@ -423,7 +423,6 @@ class Sales extends Secure_Controller $discount_type = $item_kit_info->kit_discount_type; } - $price = NULL; $print_option = PRINT_ALL; // Always include in list of items on invoice if(!empty($kit_item_id)) diff --git a/application/controllers/Taxes.php b/application/controllers/Taxes.php index 4c6a6004d..c4adc08d8 100644 --- a/application/controllers/Taxes.php +++ b/application/controllers/Taxes.php @@ -443,6 +443,8 @@ class Taxes extends Secure_Controller $array_save = array(); + $unique_tax_groups = []; + foreach($jurisdiction_id as $key => $val) { $array_save[] = array( @@ -453,6 +455,19 @@ class Taxes extends Secure_Controller 'reporting_authority'=>$this->xss_clean($reporting_authority[$key]), 'tax_group_sequence'=>$this->xss_clean($tax_group_sequence[$key]), 'cascade_sequence'=>$this->xss_clean($cascade_sequence[$key])); + + if (array_search($tax_group[$key], $unique_tax_groups) !== false) + { + echo json_encode(array( + 'success' => FALSE, + 'message' => $this->lang->line('taxes_tax_group_not_unique', $tax_group[$key]) + )); + return; + } + else + { + $unique_tax_groups[] = $tax_group[$key]; + } } $success = $this->Tax_jurisdiction->save_jurisdictions($array_save); diff --git a/application/helpers/locale_helper.php b/application/helpers/locale_helper.php index f3d87f5e8..c128e8c7f 100644 --- a/application/helpers/locale_helper.php +++ b/application/helpers/locale_helper.php @@ -66,7 +66,6 @@ function get_languages() 'es:spanish' => 'Spanish', 'es-MX:spanish' => 'Spanish (Mexico)', 'fr:french' => 'French', - 'he:hebrew' => 'Hebrew', 'hr-HR:croatian' => 'Croatian (Croatia)', 'hu-HU:hungarian' => 'Hungarian (Hungary)', 'id:indonesian' => 'Indonesian', diff --git a/application/helpers/tabular_helper.php b/application/helpers/tabular_helper.php index ba7ff5cf5..bcc2314b8 100644 --- a/application/helpers/tabular_helper.php +++ b/application/helpers/tabular_helper.php @@ -354,7 +354,7 @@ function get_items_manage_table_headers() foreach($definition_names as $definition_id => $definition_name) { - $headers[] = array($definition_id => $definition_name); + $headers[] = array($definition_id => $definition_name, 'sortable' => FALSE); } $headers[] = array('inventory' => ''); diff --git a/application/language/da/attributes_lang.php b/application/language/da/attributes_lang.php new file mode 100644 index 000000000..bb750d2e6 --- /dev/null +++ b/application/language/da/attributes_lang.php @@ -0,0 +1,30 @@ +scan($pattern); + + $found_tokens = array(); + foreach ($token_tree as $token_id => $token_length) + { + foreach ($tokens as $token) + { + if ($token->token_id() == $token_id) + { + $found_tokens[] = $token; + $keys = array_keys($token_length); + $length = array_shift($keys); + $pattern = str_replace(array_shift($token_length), "({$token->get_value()}{".$length."})", $pattern); + } + } + } + + $results = array(); + + if (preg_match("/$pattern/", $string, $matches)) + { + foreach($found_tokens as $token) + { + $index = array_search($token, $found_tokens); + $match = $matches[$index+1]; + $results[$token->token_id()] = $match; + } + } + + return $results; + } + public function generate($used_tokens, &$tokens_to_replace, &$token_values, $tokens) { foreach($used_tokens as $token_code => $token_info) { // Generate value here based on the key value - $token_value = $this->resolveToken($token_code); + $token_value = $this->resolve_token($token_code); foreach($token_info as $length => $token_spec) { @@ -102,7 +136,7 @@ class Token_lib return $token_values; } - private function resolveToken($token_code, $tokens = array()) + private function resolve_token($token_code, $tokens = array()) { foreach(array_merge($tokens, Token::get_tokens()) as $token) { diff --git a/application/migrations/20200215100000_taxgroupconstraint.php b/application/migrations/20200215100000_taxgroupconstraint.php new file mode 100644 index 000000000..b5803ee10 --- /dev/null +++ b/application/migrations/20200215100000_taxgroupconstraint.php @@ -0,0 +1,20 @@ +db->query('ALTER TABLE ' . $this->db->dbprefix('tax_jurisdictions') . ' ADD CONSTRAINT tax_jurisdictions_uq1 UNIQUE (tax_group)'); + } + + public function down() + { + $this->db->query('ALTER TABLE ' . $this->db->dbprefix('tax_jurisdictions') . ' DROP INDEX tax_jurisdictions_uq1'); + } +} +?> diff --git a/application/models/Attribute.php b/application/models/Attribute.php index 7090f1381..7340a39ff 100644 --- a/application/models/Attribute.php +++ b/application/models/Attribute.php @@ -618,7 +618,19 @@ class Attribute extends CI_Model else { $this->db->where('attribute_id', $attribute_id); - $this->db->update('attribute_values', array('attribute_value' => $attribute_value)); + + if(in_array($definition_type, [TEXT, DROPDOWN], TRUE)) + { + $this->db->update('attribute_values', array('attribute_value' => $attribute_value)); + } + else if($definition_type == DECIMAL) + { + $this->db->update('attribute_values', array('attribute_decimal' => $attribute_value)); + } + else + { + $this->db->update('attribute_values', array('attribute_date' => date('Y-m-d', strtotime($attribute_value)))); + } } $this->db->trans_complete(); diff --git a/application/models/Item.php b/application/models/Item.php index 58093e779..7307fba2c 100644 --- a/application/models/Item.php +++ b/application/models/Item.php @@ -177,19 +177,22 @@ class Item extends CI_Model if(!empty($search)) { - $this->db->group_start(); - $this->db->like('name', $search); - $this->db->or_like('item_number', $search); - $this->db->or_like('items.item_id', $search); - $this->db->or_like('company_name', $search); - $this->db->or_like('items.category', $search); - if ($filters['search_custom'] && $attributes_enabled) - { - $this->db->or_like('attribute_value', $search); - $this->db->or_like('attribute_date', $search); - $this->db->or_like('attribute_decimal', $search); - } - $this->db->group_end(); + if ($attributes_enabled && $filters['search_custom']) + { + $this->db->having("attribute_values LIKE '%$search%'"); + $this->db->or_having("attribute_dtvalues LIKE '%$search%'"); + $this->db->or_having("attribute_dvalues LIKE '%$search%'"); + } + else + { + $this->db->group_start(); + $this->db->like('name', $search); + $this->db->or_like('item_number', $search); + $this->db->or_like('items.item_id', $search); + $this->db->or_like('company_name', $search); + $this->db->or_like('items.category', $search); + $this->db->group_end(); + } } if($attributes_enabled) diff --git a/application/models/reports/Detailed_sales.php b/application/models/reports/Detailed_sales.php index 84332d740..86de8cdb2 100644 --- a/application/models/reports/Detailed_sales.php +++ b/application/models/reports/Detailed_sales.php @@ -145,7 +145,7 @@ class Detailed_sales extends Report foreach($data['summary'] as $key=>$value) { $this->db->select(' - MAX(name) AS name, + name, category, quantity_purchased, item_location, diff --git a/application/models/tokens/Token.php b/application/models/tokens/Token.php index d482de0e4..ed125b42e 100644 --- a/application/models/tokens/Token.php +++ b/application/models/tokens/Token.php @@ -25,6 +25,11 @@ abstract class Token $this->value = $value; } + static function get_barcode_tokens() + { + return array(); + } + static function get_tokens() { return array(new Token_customer(), new Token_invoice_count(), new Token_invoice_sequence(), diff --git a/application/models/tokens/Token_barcode_ean.php b/application/models/tokens/Token_barcode_ean.php new file mode 100644 index 000000000..f6c125cf4 --- /dev/null +++ b/application/models/tokens/Token_barcode_ean.php @@ -0,0 +1,22 @@ + \ No newline at end of file diff --git a/application/models/tokens/Token_barcode_price.php b/application/models/tokens/Token_barcode_price.php new file mode 100644 index 000000000..1b12eb158 --- /dev/null +++ b/application/models/tokens/Token_barcode_price.php @@ -0,0 +1,22 @@ + \ No newline at end of file diff --git a/application/models/tokens/Token_barcode_weight.php b/application/models/tokens/Token_barcode_weight.php new file mode 100644 index 000000000..bb4f118ec --- /dev/null +++ b/application/models/tokens/Token_barcode_weight.php @@ -0,0 +1,22 @@ + diff --git a/application/tests/.gitignore b/application/tests/.gitignore new file mode 100644 index 000000000..e2e075338 --- /dev/null +++ b/application/tests/.gitignore @@ -0,0 +1 @@ +_ci_phpunit_test/tmp/ diff --git a/application/tests/helpers/Locale_helper_test.php b/application/tests/helpers/Locale_helper_test.php new file mode 100644 index 000000000..4b7994215 --- /dev/null +++ b/application/tests/helpers/Locale_helper_test.php @@ -0,0 +1,22 @@ +assertEquals(2.22, $decimals); + } + + public function test_format_decimals() + { + $decimals = to_decimals(5, 2); + + $this->assertEquals(5.00, $decimals); + } + + +} diff --git a/application/tests/libraries/Barcode_lib_test.php b/application/tests/libraries/Barcode_lib_test.php index e69de29bb..e6cdc009b 100644 --- a/application/tests/libraries/Barcode_lib_test.php +++ b/application/tests/libraries/Barcode_lib_test.php @@ -0,0 +1,38 @@ +resetInstance(); + + $this->obj = $this->newLibrary('Barcode_lib'); + } + + public function test_barcode_weight_first() + { + $this->CI->config->set_item('barcode_formats', json_encode(array("02(\d{5})(\w{6})"))); + + $item_number = "0250000123456"; + $quantity = 0; + $this->obj->parse_barcode_fields($quantity, $item_number); + + echo $quantity; + $this->assertEquals(123.456, $quantity); + $this->assertEquals("50000", $item_number); + } + + public function test_barcode_weight_last() + { + $this->CI->config->set_item('barcode_formats', json_encode(array("02(\w{6})(\d{5})"))); + + $item_number = "0212345650001"; + $quantity = 0; + $this->obj->parse_barcode_fields($quantity, $item_number); + + $this->assertEquals(50.001, $quantity); + $this->assertEquals(123456, $item_number); + } +} \ No newline at end of file diff --git a/application/views/attributes/form.php b/application/views/attributes/form.php index be4606cce..2a3e1ed71 100644 --- a/application/views/attributes/form.php +++ b/application/views/attributes/form.php @@ -128,7 +128,7 @@ $(document).ready(function() } else { - $.post('' + value, {definition_id: definition_id}); + $.post('' + escape(value), {definition_id: definition_id}); } $(this).parents("li").remove(); }; @@ -137,7 +137,7 @@ $(document).ready(function() { var is_event = typeof(value) !== 'string'; - if ($("#definition_value").val().match(/(\||:)/g) != null) + if ($("#definition_value").val().match(/(\||_)/g) != null) { return; } @@ -157,7 +157,7 @@ $(document).ready(function() } else { - $.post('' + value, {definition_id: definition_id}); + $.post('' + escape(value), {definition_id: definition_id}); } } diff --git a/application/views/sales/form.php b/application/views/sales/form.php index 40383b8e7..f7eeb52bf 100755 --- a/application/views/sales/form.php +++ b/application/views/sales/form.php @@ -160,14 +160,13 @@ $(document).ready(function() load->view('partial/datepicker_locale'); ?> - var fill_value_customer = function(event, ui) { + var fill_value_customer = function(event, ui) { event.preventDefault(); $("input[name='customer_id']").val(ui.item.value); $("input[name='customer_name']").val(ui.item.label); }; - $('#customer_name').autocomplete( - { + $('#customer_name').autocomplete( { source: "", minChars: 0, delay: 15, @@ -177,14 +176,13 @@ $(document).ready(function() focus: fill_value_customer }); - var fill_value_employee = function(event, ui) { + var fill_value_employee = function(event, ui) { event.preventDefault(); $("input[name='employee_id']").val(ui.item.value); $("input[name='employee_name']").val(ui.item.label); }; - $('#employee_name').autocomplete( - { + $('#employee_name').autocomplete( { source: "", minChars: 0, delay: 15, @@ -204,8 +202,7 @@ $(document).ready(function() table_support.do_restore("", ); }); - $('#sales_edit_form').validate($.extend( - { + $('#sales_edit_form').validate($.extend( { submitHandler: function(form) { $(form).ajaxSubmit({ success: function(response) diff --git a/bin/install.php b/bin/install.php index 9d805bcc1..3829325b6 100755 --- a/bin/install.php +++ b/bin/install.php @@ -253,7 +253,7 @@ class Installer foreach ($iterator as $file) { if ($file->isDir()) { - @mkdir($dst . '/' . $iterator->getSubPathName(), 0777, TRUE); + @mkdir($dst . '/' . $iterator->getSubPathName(), 0775, TRUE); } else { $success = copy($file, $dst . '/' . $iterator->getSubPathName()); diff --git a/composer.json b/composer.json index 42de3f88e..af99eab87 100644 --- a/composer.json +++ b/composer.json @@ -16,15 +16,23 @@ "POS" ], "homepage": "https://github.com/opensourcepos/opensourcepos", + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/kenjis/ci-phpunit-test" + } + ], "require": { "php": "^5.6 || ^7.0", "codeigniter/framework": "^3.1.11", "dompdf/dompdf": "^0.7", "tamtamchik/namecase": "^1.0", - "paragonie/random_compat": "^2.0" + "paragonie/random_compat": "^2.0", + "vlucas/phpdotenv": "^2.4" }, "require-dev": { - "mikey179/vfsStream": "1.1.*", - "vlucas/phpdotenv": "^2.4" + "mikey179/vfsstream": "1.1.*", + "phpunit/phpunit": "7.5.6", + "kenjis/ci-phpunit-test": "dev-master" } } diff --git a/composer.lock b/composer.lock index 426a249ad..1207340bd 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "3322819f98ab53e62fc89cb8b1e4cb8a", + "content-hash": "d0d33e06b18584def4308d4a68eaf4ef", "packages": [ { "name": "codeigniter/framework", @@ -279,7 +279,108 @@ ], "packages-dev": [ { - "name": "mikey179/vfsStream", + "name": "doctrine/instantiator", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "ae466f726242e637cebdd526a7d991b9433bacf1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/ae466f726242e637cebdd526a7d991b9433bacf1", + "reference": "ae466f726242e637cebdd526a7d991b9433bacf1", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.13", + "phpstan/phpstan-phpunit": "^0.11", + "phpstan/phpstan-shim": "^0.11", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2019-10-21T16:45:58+00:00" + }, + { + "name": "kenjis/ci-phpunit-test", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/kenjis/ci-phpunit-test.git", + "reference": "d7ab6c251515e1f78918c6b9489dac6aec571e4e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kenjis/ci-phpunit-test/zipball/d7ab6c251515e1f78918c6b9489dac6aec571e4e", + "reference": "d7ab6c251515e1f78918c6b9489dac6aec571e4e", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^2.1|^3.0|^4.2", + "php": ">=5.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kenji Suzuki", + "homepage": "https://github.com/kenjis" + } + ], + "description": "An easier way to use PHPUnit with CodeIgniter 3.x", + "homepage": "http://kenjis.github.io/ci-phpunit-test/", + "keywords": [ + "codeigniter", + "monkey patch", + "phpunit", + "test", + "unit testing" + ], + "time": "2020-01-30T02:00:51+00:00" + }, + { + "name": "mikey179/vfsstream", "version": "v1.1.0", "source": { "type": "git", @@ -308,6 +409,1324 @@ "homepage": "http://vfs.bovigo.org/", "time": "2012-08-25T12:49:29+00:00" }, + { + "name": "myclabs/deep-copy", + "version": "1.9.5", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/b2c28789e80a97badd14145fda39b545d83ca3ef", + "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "replace": { + "myclabs/deep-copy": "self.version" + }, + "require-dev": { + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "time": "2020-01-17T21:11:47+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.3.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "9a9981c347c5c49d6dfe5cf826bb882b824080dc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/9a9981c347c5c49d6dfe5cf826bb882b824080dc", + "reference": "9a9981c347c5c49d6dfe5cf826bb882b824080dc", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "0.0.5", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "time": "2019-11-08T13:50:10+00:00" + }, + { + "name": "phar-io/manifest", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", + "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "phar-io/version": "^2.0", + "php": "^5.6 || ^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "time": "2018-07-08T19:23:20+00:00" + }, + { + "name": "phar-io/version", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6", + "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "time": "2018-07-08T19:19:57+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a", + "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "~6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2018-08-07T13:53:10+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "4.3.4", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/da3fd972d6bafd628114f7e7e036f45944b62e9c", + "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c", + "shasum": "" + }, + "require": { + "php": "^7.0", + "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0", + "phpdocumentor/type-resolver": "~0.4 || ^1.0.0", + "webmozart/assert": "^1.0" + }, + "require-dev": { + "doctrine/instantiator": "^1.0.5", + "mockery/mockery": "^1.0", + "phpdocumentor/type-resolver": "0.4.*", + "phpunit/phpunit": "^6.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "time": "2019-12-28T18:55:12+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", + "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", + "shasum": "" + }, + "require": { + "php": "^7.1", + "phpdocumentor/reflection-common": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "^7.1", + "mockery/mockery": "~1", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "time": "2019-08-22T18:11:29+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "v1.10.2", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "b4400efc9d206e83138e2bb97ed7f5b14b831cd9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/b4400efc9d206e83138e2bb97ed7f5b14b831cd9", + "reference": "b4400efc9d206e83138e2bb97ed7f5b14b831cd9", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", + "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" + }, + "require-dev": { + "phpspec/phpspec": "^2.5 || ^3.2", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10.x-dev" + } + }, + "autoload": { + "psr-4": { + "Prophecy\\": "src/Prophecy" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2020-01-20T15:57:02+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "6.1.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", + "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-xmlwriter": "*", + "php": "^7.1", + "phpunit/php-file-iterator": "^2.0", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-token-stream": "^3.0", + "sebastian/code-unit-reverse-lookup": "^1.0.1", + "sebastian/environment": "^3.1 || ^4.0", + "sebastian/version": "^2.0.1", + "theseer/tokenizer": "^1.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.0" + }, + "suggest": { + "ext-xdebug": "^2.6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2018-10-31T16:06:48+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "050bedf145a257b1ff02746c31894800e5122946" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946", + "reference": "050bedf145a257b1ff02746c31894800e5122946", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2018-09-13T20:33:42+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2015-06-21T13:50:34+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "2.1.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "1038454804406b0b5f5f520358e78c1c2f71501e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/1038454804406b0b5f5f520358e78c1c2f71501e", + "reference": "1038454804406b0b5f5f520358e78c1c2f71501e", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2019-06-07T04:22:29+00:00" + }, + { + "name": "phpunit/php-token-stream", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/995192df77f63a59e47f025390d2d1fdf8f425ff", + "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "time": "2019-09-17T06:23:10+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "7.5.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "09c85e14994df92e5ff1f5ec0b481bdb7d3d3df9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/09c85e14994df92e5ff1f5ec0b481bdb7d3d3df9", + "reference": "09c85e14994df92e5ff1f5ec0b481bdb7d3d3df9", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "myclabs/deep-copy": "^1.7", + "phar-io/manifest": "^1.0.2", + "phar-io/version": "^2.0", + "php": "^7.1", + "phpspec/prophecy": "^1.7", + "phpunit/php-code-coverage": "^6.0.7", + "phpunit/php-file-iterator": "^2.0.1", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-timer": "^2.0", + "sebastian/comparator": "^3.0", + "sebastian/diff": "^3.0", + "sebastian/environment": "^4.0", + "sebastian/exporter": "^3.1", + "sebastian/global-state": "^2.0", + "sebastian/object-enumerator": "^3.0.3", + "sebastian/resource-operations": "^2.0", + "sebastian/version": "^2.0.1" + }, + "conflict": { + "phpunit/phpunit-mock-objects": "*" + }, + "require-dev": { + "ext-pdo": "*" + }, + "suggest": { + "ext-soap": "*", + "ext-xdebug": "*", + "phpunit/php-invoker": "^2.0" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.5-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2019-02-18T09:24:50+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "time": "2017-03-04T06:30:41+00:00" + }, + { + "name": "sebastian/comparator", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da", + "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da", + "shasum": "" + }, + "require": { + "php": "^7.1", + "sebastian/diff": "^3.0", + "sebastian/exporter": "^3.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2018-07-12T15:12:46+00:00" + }, + { + "name": "sebastian/diff", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/720fcc7e9b5cf384ea68d9d930d480907a0c1a29", + "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.5 || ^8.0", + "symfony/process": "^2 || ^3.3 || ^4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "time": "2019-02-04T06:01:07+00:00" + }, + { + "name": "sebastian/environment", + "version": "4.2.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/464c90d7bdf5ad4e8a6aea15c091fec0603d4368", + "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.5" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2019-11-20T08:46:58+00:00" + }, + { + "name": "sebastian/exporter", + "version": "3.1.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/68609e1261d215ea5b21b7987539cbfbe156ec3e", + "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e", + "shasum": "" + }, + "require": { + "php": "^7.0", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2019-09-14T09:02:43+00:00" + }, + { + "name": "sebastian/global-state", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "time": "2017-04-27T15:39:26+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "shasum": "" + }, + "require": { + "php": "^7.0", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "time": "2017-08-03T12:35:26+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "773f97c67f28de00d397be301821b06708fca0be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", + "reference": "773f97c67f28de00d397be301821b06708fca0be", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "time": "2017-03-29T09:07:27+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2017-03-03T06:23:57+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9", + "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "time": "2018-10-04T04:07:39+00:00" + }, + { + "name": "sebastian/version", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2016-10-03T07:35:21+00:00" + }, { "name": "symfony/polyfill-ctype", "version": "v1.13.1", @@ -366,6 +1785,46 @@ ], "time": "2019-11-27T13:56:44+00:00" }, + { + "name": "theseer/tokenizer", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9", + "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "time": "2019-06-13T22:48:21+00:00" + }, { "name": "vlucas/phpdotenv", "version": "v2.6.1", @@ -416,11 +1875,61 @@ "environment" ], "time": "2019-01-29T11:11:52+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.6.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "573381c0a64f155a0d9a23f4b0c797194805b925" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/573381c0a64f155a0d9a23f4b0c797194805b925", + "reference": "573381c0a64f155a0d9a23f4b0c797194805b925", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "vimeo/psalm": "<3.6.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36 || ^7.5.13" + }, + "type": "library", + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "time": "2019-11-24T13:36:37+00:00" } ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "kenjis/ci-phpunit-test": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { diff --git a/database/Dockerfile b/database/Dockerfile deleted file mode 100644 index 9a2388a68..000000000 --- a/database/Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -FROM alpine -MAINTAINER jekkos - -ADD database.sql /docker-entrypoint-initdb.d/database.sql -VOLUME /docker-entrypoint-initdb.d diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index aa4dc0129..ea79868e2 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -1,20 +1,16 @@ -version: '2' +version: '3.4' volumes: uploads: driver: local services: - sqlscript: - build: - context: database/ - dockerfile: Dockerfile ospos: build: context: . - dockerfile: Dockerfile.dev - container_name: ospos + target: ospos_dev + container_name: ospos_dev restart: always depends_on: - mysql @@ -31,13 +27,13 @@ services: - XDEBUG_CONFIG=remote_host=172.17.0.1 mysql: - image: mariadb:10.1.21 + image: mariadb:10.3 container_name: mysql restart: always ports: - "3306:3306" - volumes_from: - - sqlscript + volumes: + - ./database/database.sql:/docker-entrypoint-initdb.d/database.sql environment: - MYSQL_ROOT_PASSWORD=pointofsale - MYSQL_DATABASE=ospos diff --git a/docker-compose.test.yml b/docker-compose.test.yml index eeba2eb3b..fd8cc4f48 100644 --- a/docker-compose.test.yml +++ b/docker-compose.test.yml @@ -1,38 +1,28 @@ -version: '2' +version: '3.4' services: test: build: context: . - dockerfile: Dockerfile.test - - sqlscript: - build: - context: database/ - dockerfile: Dockerfile - - ospos: - build: - context: . - dockerfile: Dockerfile - container_name: ospos - restart: always - depends_on: + target: ospos_test + depends_on: - mysql - ports: - - "80:80" + container_name: ospos_test environment: + - CI_ENV=testing + - ENCRYPTION_KEY= + - MYSQL_HOST_NAME=mysql + - MYSQL_DATABASE=ospos - MYSQL_USERNAME=admin - MYSQL_PASSWORD=pointofsale - - MYSQL_DB_NAME=ospos - - MYSQL_HOST_NAME=mysql + command: ["/bin/wait-for-it.sh", "mysql:3306", "--", "/app/vendor/phpunit/phpunit/phpunit"] + ports: + - "80:80" mysql: - image: mysql:5.7 + image: mariadb:10.3 container_name: mysql restart: always - ports: - - "3306:3306" volumes: - ./database/database.sql:/docker-entrypoint-initdb.d/database.sql environment: diff --git a/docker-compose.yml b/docker-compose.yml index e46b840f0..e34f73589 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -version: '2' +version: '3.4' volumes: uploads: @@ -11,15 +11,10 @@ networks: db_net: services: - sqlscript: - build: - context: database/ - dockerfile: Dockerfile - ospos: build: context: . - dockerfile: Dockerfile + target: ospos container_name: ospos restart: always depends_on: @@ -49,8 +44,8 @@ services: - "3306" networks: - db_net - volumes_from: - - sqlscript + volumes: + - ./database/database.sql:/docker-entrypoint-initdb.d/database.sql environment: - MYSQL_ROOT_PASSWORD=${OSPOS_MYSQL_ROOT_PASSWORD} - MYSQL_DATABASE=ospos