From a22c2e02bea44178dc51c704fde20d7e2a074117 Mon Sep 17 00:00:00 2001 From: Annika Wolff Date: Wed, 27 May 2020 11:31:35 +0200 Subject: [PATCH 01/61] introduce cronjob to automatically deactivate expired events --- app/Console/Kernel.php | 4 +- .../BookingProductEventTicketFactory.php | 19 +++++ .../Factories/BookingProductFactory.php | 20 +++++ .../BookingProductServiceProvider.php | 8 +- .../Core/src/Console/Commands/BookingCron.php | 75 +++++++++++++++++++ .../src/Providers/CoreServiceProvider.php | 10 ++- tests/_support/Helper/DataMocker.php | 2 +- tests/unit.suite.yml | 1 + tests/unit/Core/Commands/BookingCronCest.php | 55 ++++++++++++++ 9 files changed, 188 insertions(+), 6 deletions(-) create mode 100644 packages/Webkul/BookingProduct/src/Database/Factories/BookingProductEventTicketFactory.php create mode 100644 packages/Webkul/BookingProduct/src/Database/Factories/BookingProductFactory.php create mode 100644 packages/Webkul/Core/src/Console/Commands/BookingCron.php create mode 100644 tests/unit/Core/Commands/BookingCronCest.php diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 85533a8dc..2cf59a56a 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -24,8 +24,7 @@ class Kernel extends ConsoleKernel */ protected function schedule(Schedule $schedule) { - // $schedule->command('inspire') - // ->hourly(); + $schedule->command('booking:cron')->dailyAt('3:00'); } /** @@ -36,6 +35,7 @@ class Kernel extends ConsoleKernel protected function commands() { $this->load(__DIR__.'/Commands'); + $this->load(__DIR__.'/../../packages/Webkul/Core/src/Console/Commands'); require base_path('routes/console.php'); } diff --git a/packages/Webkul/BookingProduct/src/Database/Factories/BookingProductEventTicketFactory.php b/packages/Webkul/BookingProduct/src/Database/Factories/BookingProductEventTicketFactory.php new file mode 100644 index 000000000..09f79b311 --- /dev/null +++ b/packages/Webkul/BookingProduct/src/Database/Factories/BookingProductEventTicketFactory.php @@ -0,0 +1,19 @@ +define(BookingProductEventTicket::class, function (Faker $faker, array $attributes) { + return [ + 'price' => $faker->randomFloat(4, 3, 900), + 'qty' => $faker->randomNumber(2), + 'booking_product_id' => static function () { + return factory(BookingProduct::class)->create(['type' => 'event'])->id; + } + ]; +}); \ No newline at end of file diff --git a/packages/Webkul/BookingProduct/src/Database/Factories/BookingProductFactory.php b/packages/Webkul/BookingProduct/src/Database/Factories/BookingProductFactory.php new file mode 100644 index 000000000..3b74a8a1f --- /dev/null +++ b/packages/Webkul/BookingProduct/src/Database/Factories/BookingProductFactory.php @@ -0,0 +1,20 @@ +define(BookingProduct::class, function (Faker $faker, array $attributes) { + return [ + 'type' => array_rand(['event']), + 'qty' => $faker->randomNumber(2), + 'available_from' => Carbon::yesterday(), + 'available_to' => Carbon::tomorrow(), + 'product_id' => function () { + return factory(Product::class)->create(['type' => 'booking'])->id; + } + ]; +}); \ No newline at end of file diff --git a/packages/Webkul/BookingProduct/src/Providers/BookingProductServiceProvider.php b/packages/Webkul/BookingProduct/src/Providers/BookingProductServiceProvider.php index 92bec1ff8..b31d28d7f 100644 --- a/packages/Webkul/BookingProduct/src/Providers/BookingProductServiceProvider.php +++ b/packages/Webkul/BookingProduct/src/Providers/BookingProductServiceProvider.php @@ -2,6 +2,7 @@ namespace Webkul\BookingProduct\Providers; +use Illuminate\Database\Eloquent\Factory as EloquentFactory; use Illuminate\Support\ServiceProvider; class BookingProductServiceProvider extends ServiceProvider @@ -10,8 +11,9 @@ class BookingProductServiceProvider extends ServiceProvider * Bootstrap services. * * @return void + * @throws \Illuminate\Contracts\Container\BindingResolutionException */ - public function boot() + public function boot(): void { $this->loadRoutesFrom(__DIR__ . '/../Http/front-routes.php'); @@ -26,6 +28,8 @@ class BookingProductServiceProvider extends ServiceProvider ], 'public'); $this->app->register(EventServiceProvider::class); + + $this->app->make(EloquentFactory::class)->load(__DIR__ . '/../Database/Factories'); } /** @@ -33,7 +37,7 @@ class BookingProductServiceProvider extends ServiceProvider * * @return void */ - public function register() + public function register(): void { $this->mergeConfigFrom( dirname(__DIR__) . '/Config/product_types.php', 'product_types' diff --git a/packages/Webkul/Core/src/Console/Commands/BookingCron.php b/packages/Webkul/Core/src/Console/Commands/BookingCron.php new file mode 100644 index 000000000..cc1a2b59e --- /dev/null +++ b/packages/Webkul/Core/src/Console/Commands/BookingCron.php @@ -0,0 +1,75 @@ +join('product_flat', 'booking_products.product_id', '=', 'product_flat.product_id') + ->where('booking_products.type', 'event') + ->where('booking_products.available_to', '<=', Carbon::now()) + ->where('product_flat.status', 1) + ->get(); + + if (count($expiredEvents) > 0) { + $attStatusId = Attribute::query()->select('id') + ->where('code', 'status') + ->first() + ->id; + + foreach ($expiredEvents as $expEvent) { + ProductAttributeValue::query()->where('product_id', $expEvent->product_id) + ->where('attribute_id', $attStatusId) + ->update(['boolean_value' => 0]); + + ProductFlat::query()->where('product_id', $expEvent->product_id) + ->update(['status' => 0]); + + Log::info('BookingCron: deactivated expired event', ['booking_product_id' => $expEvent->id, 'product_id' => $expEvent->product_id]); + } + $this->info('All expired events have been deactivated'); + } else { + Log::info('BookingCron: Did not find any expired events to be deactivated'); + $this->info('Did not find any expired events to be deactivated'); + } + } +} diff --git a/packages/Webkul/Core/src/Providers/CoreServiceProvider.php b/packages/Webkul/Core/src/Providers/CoreServiceProvider.php index b60cdd31e..cc6fe420b 100755 --- a/packages/Webkul/Core/src/Providers/CoreServiceProvider.php +++ b/packages/Webkul/Core/src/Providers/CoreServiceProvider.php @@ -7,6 +7,7 @@ use Illuminate\Database\Eloquent\Factory as EloquentFactory; use Illuminate\Support\ServiceProvider; use Illuminate\Support\Facades\Validator; use Illuminate\Foundation\AliasLoader; +use Webkul\Core\Console\Commands\BookingCron; use Webkul\Core\Core; use Webkul\Core\Exceptions\Handler; use Webkul\Core\Facades\Core as CoreFacade; @@ -22,6 +23,7 @@ class CoreServiceProvider extends ServiceProvider * Bootstrap services. * * @return void + * @throws \Illuminate\Contracts\Container\BindingResolutionException */ public function boot() { @@ -86,7 +88,12 @@ class CoreServiceProvider extends ServiceProvider protected function registerCommands(): void { if ($this->app->runningInConsole()) { - $this->commands([BagistoVersion::class, Install::class, ExchangeRateUpdate::class]); + $this->commands([ + BagistoVersion::class, + Install::class, + ExchangeRateUpdate::class, + BookingCron::class + ]); } } @@ -96,6 +103,7 @@ class CoreServiceProvider extends ServiceProvider * @param string $path * * @return void + * @throws \Illuminate\Contracts\Container\BindingResolutionException */ protected function registerEloquentFactoriesFrom($path): void { diff --git a/tests/_support/Helper/DataMocker.php b/tests/_support/Helper/DataMocker.php index 536e2dbef..cb351ab5a 100644 --- a/tests/_support/Helper/DataMocker.php +++ b/tests/_support/Helper/DataMocker.php @@ -15,7 +15,7 @@ class DataMocker extends Module /** * Get an instance of the faker * - * @return Generator + * @return \Faker\Generator * * @author florianbosdorff */ diff --git a/tests/unit.suite.yml b/tests/unit.suite.yml index ba6191f9a..cab8a5bc2 100644 --- a/tests/unit.suite.yml +++ b/tests/unit.suite.yml @@ -8,6 +8,7 @@ modules: - Asserts - Filesystem - \Helper\Unit + - \Helper\DataMocker - Webkul\Core\Helpers\Laravel5Helper: environment_file: .env.testing run_database_migrations: true diff --git a/tests/unit/Core/Commands/BookingCronCest.php b/tests/unit/Core/Commands/BookingCronCest.php new file mode 100644 index 000000000..455fcf2ec --- /dev/null +++ b/tests/unit/Core/Commands/BookingCronCest.php @@ -0,0 +1,55 @@ +fake()->numberBetween(2, 6); + + for ($i=0; $i<$index; $i++) { + $products[$i] = $I->haveProduct(Laravel5Helper::VIRTUAL_PRODUCT); + Product::query()->where('id', $products[$i]->id)->update(['type' => 'booking']); + + if ($I->fake()->randomDigitNotNull <= 5) { + $availableTo = Carbon::now()->subMinutes($I->fake()->numberBetween(2, 59)); + } else { + $availableTo = Carbon::now()->addMinutes($I->fake()->numberBetween(2, 59)); + } + + $bookingProducts[$i] = $I->have(BookingProduct::class, [ + 'type' => 'event', + 'available_to' => $availableTo->toDateTimeString(), + 'product_id' => $products[$i]->id, + ]); + + $I->have(BookingProductEventTicket::class, + ['booking_product_id' => $bookingProducts[$i]->id]); + + $products[$i]->refresh(); + $I->assertNotFalse($products[$i]->status); + } + + $I->callArtisan('booking:cron'); + + for ($i=0; $i<$index; $i++) { + $products[$i]->refresh(); + + if ($bookingProducts[$i]->available_to < Carbon::now()) { + $I->assertEquals(0, $products[$i]->status); + } else { + $I->assertEquals(1, $products[$i]->status); + } + } + } +} + From 5c067d11de0c9a59cfa261e44e7124a133a26d45 Mon Sep 17 00:00:00 2001 From: Matt April Date: Fri, 29 May 2020 12:36:58 -0400 Subject: [PATCH 02/61] Fixed case sensitivity typo in Bundle class --- packages/Webkul/Product/src/Type/Bundle.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/Webkul/Product/src/Type/Bundle.php b/packages/Webkul/Product/src/Type/Bundle.php index 6f797494d..3e96cbfbd 100644 --- a/packages/Webkul/Product/src/Type/Bundle.php +++ b/packages/Webkul/Product/src/Type/Bundle.php @@ -93,7 +93,7 @@ class Bundle extends AbstractType ProductRepository $productRepository, ProductAttributeValueRepository $attributeValueRepository, ProductInventoryRepository $productInventoryRepository, - productImageRepository $productImageRepository, + ProductImageRepository $productImageRepository, ProductBundleOptionRepository $productBundleOptionRepository, ProductBundleOptionProductRepository $productBundleOptionProductRepository, ProductImage $productImageHelper, From 37c3e2b046fcc9b749d4c75a39bdb0e061812d61 Mon Sep 17 00:00:00 2001 From: bhumikaisarani <63963172+bhumikaisarani@users.noreply.github.com> Date: Sun, 31 May 2020 16:45:43 +0530 Subject: [PATCH 03/61] Update 503.blade.php --- resources/views/errors/503.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/errors/503.blade.php b/resources/views/errors/503.blade.php index acd38100a..238eee330 100644 --- a/resources/views/errors/503.blade.php +++ b/resources/views/errors/503.blade.php @@ -2,4 +2,4 @@ @section('title', __('Service Unavailable')) @section('code', '503') -@section('message', __($exception->getMessage() ?: 'Service Unavailable')) +@section('message', __($exception->getMessage() ?: 'Srvice Unavailable')) From 6ee005dda0bb7e09df24256b1ae7413e8bf866be Mon Sep 17 00:00:00 2001 From: Herbert Maschke Date: Wed, 3 Jun 2020 09:24:40 +0200 Subject: [PATCH 04/61] make a prefix to the copied cart rule ('copy of XXX') and properly save related channels and customer groups after replication --- .../Admin/src/Resources/lang/de/app.php | 1 + .../Admin/src/Resources/lang/en/app.php | 1 + .../Http/Controllers/CartRuleController.php | 13 +++++++- .../functional/CartRule/CartRuleCopyCest.php | 30 +++++++++++++++++-- 4 files changed, 42 insertions(+), 3 deletions(-) diff --git a/packages/Webkul/Admin/src/Resources/lang/de/app.php b/packages/Webkul/Admin/src/Resources/lang/de/app.php index 11c4a4026..43bea0b2b 100755 --- a/packages/Webkul/Admin/src/Resources/lang/de/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/de/app.php @@ -2,6 +2,7 @@ return array ( 'save' => 'Speichern', + 'copy-of' => 'Kopie von', 'create' => 'Erstellen', 'update' => 'Update', 'delete' => 'Löschen', diff --git a/packages/Webkul/Admin/src/Resources/lang/en/app.php b/packages/Webkul/Admin/src/Resources/lang/en/app.php index 3836352aa..91b4f9852 100755 --- a/packages/Webkul/Admin/src/Resources/lang/en/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/en/app.php @@ -2,6 +2,7 @@ return [ 'save' => 'Save', + 'copy-of' => 'Copy of', 'create' => 'Create', 'update' => 'Update', 'delete' => 'Delete', diff --git a/packages/Webkul/CartRule/src/Http/Controllers/CartRuleController.php b/packages/Webkul/CartRule/src/Http/Controllers/CartRuleController.php index daaeeb0e9..bf2fa96c6 100644 --- a/packages/Webkul/CartRule/src/Http/Controllers/CartRuleController.php +++ b/packages/Webkul/CartRule/src/Http/Controllers/CartRuleController.php @@ -85,10 +85,21 @@ class CartRuleController extends Controller $copiedCartRule = $originalCartRule ->replicate() - ->fill(['status' => 0]); + ->fill([ + 'status' => 0, + 'name' => __('admin::app.copy-of') . ' ' . $originalCartRule->name, + ]); $copiedCartRule->save(); + foreach($copiedCartRule->channels as $channel) { + $copiedCartRule->channels()->save($channel); + } + + foreach($copiedCartRule->customer_groups as $group) { + $copiedCartRule->customer_groups()->save($group); + } + return view($this->_config['view'], [ 'cartRule' => $copiedCartRule, ]); diff --git a/tests/functional/CartRule/CartRuleCopyCest.php b/tests/functional/CartRule/CartRuleCopyCest.php index 5b0a08301..7b6c5281d 100644 --- a/tests/functional/CartRule/CartRuleCopyCest.php +++ b/tests/functional/CartRule/CartRuleCopyCest.php @@ -3,6 +3,7 @@ namespace Tests\Functional\CartRule; use FunctionalTester; +use Illuminate\Support\Facades\DB; use Webkul\CartRule\Models\CartRule; class CartRuleCopyCest @@ -16,19 +17,44 @@ class CartRuleCopyCest 'status' => 1, ]); - $count = count(cartRule::all()); + DB::table('cart_rule_channels')->insert([ + 'cart_rule_id' => $original->id, + 'channel_id' => 1, + ]); + + DB::table('cart_rule_customer_groups')->insert([ + 'cart_rule_id' => $original->id, + 'customer_group_id' => 1, + ]); + + $count = count(CartRule::all()); $I->amOnAdminRoute('admin.cart-rules.copy', ['id' => $original->id]); $I->seeRecord(CartRule::class, [ 'id' => $original->id + 1, 'status' => 0, - 'name' => $original->name, + 'name' => 'Copy of ' . $original->name, ]); $I->assertCount($count + 1, CartRule::all()); + $I->assertEquals( + DB::table('cart_rule_channels') + ->pluck('cart_rule_id', 'channel_id') + ->toArray(), + [1 => $original->id + 1] + ); + + $I->assertEquals( + DB::table('cart_rule_customer_groups') + ->pluck('cart_rule_id', 'customer_group_id') + ->toArray(), + [1 => $original->id + 1] + ); + $I->seeResponseCodeIsSuccessful(); + $I->seeCurrentRouteIs('admin.cart-rules.copy'); } } From baa9e3f57154124ca097b18e43ca51e11997eff7 Mon Sep 17 00:00:00 2001 From: Florian Bosdorff Date: Fri, 5 Jun 2020 07:54:47 +0200 Subject: [PATCH 05/61] fix tiny issues due to code guidelines --- .../CartRule/src/Http/Controllers/CartRuleController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/Webkul/CartRule/src/Http/Controllers/CartRuleController.php b/packages/Webkul/CartRule/src/Http/Controllers/CartRuleController.php index bf2fa96c6..e0cbf68e9 100644 --- a/packages/Webkul/CartRule/src/Http/Controllers/CartRuleController.php +++ b/packages/Webkul/CartRule/src/Http/Controllers/CartRuleController.php @@ -92,11 +92,11 @@ class CartRuleController extends Controller $copiedCartRule->save(); - foreach($copiedCartRule->channels as $channel) { + foreach ($copiedCartRule->channels as $channel) { $copiedCartRule->channels()->save($channel); } - foreach($copiedCartRule->customer_groups as $group) { + foreach ($copiedCartRule->customer_groups as $group) { $copiedCartRule->customer_groups()->save($group); } From 351c38c9e837833d737aac1e2b495d4cfa03351e Mon Sep 17 00:00:00 2001 From: Florian Bosdorff Date: Fri, 5 Jun 2020 08:08:31 +0200 Subject: [PATCH 06/61] add default value for search term --- .../Product/src/Repositories/SearchRepository.php | 11 +++++------ .../src/Repositories/Product/ProductRepository.php | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/Webkul/Product/src/Repositories/SearchRepository.php b/packages/Webkul/Product/src/Repositories/SearchRepository.php index 80a25dfe7..0f9ea2921 100755 --- a/packages/Webkul/Product/src/Repositories/SearchRepository.php +++ b/packages/Webkul/Product/src/Repositories/SearchRepository.php @@ -18,14 +18,15 @@ class SearchRepository extends Repository /** * Create a new repository instance. * - * @param Webkul\Product\Repositories\ProductRepository $productRepository + * @param \Webkul\Product\Repositories\ProductRepository $productRepository + * @param \Illuminate\Container\Container $app + * * @return void */ public function __construct( ProductRepository $productRepository, App $app - ) - { + ) { parent::__construct($app); $this->productRepository = $productRepository; @@ -38,8 +39,6 @@ class SearchRepository extends Repository public function search($data) { - $products = $this->productRepository->searchProductByAttribute($data['term']); - - return $products; + return $this->productRepository->searchProductByAttribute($data['term'] ?? ''); } } \ No newline at end of file diff --git a/packages/Webkul/Velocity/src/Repositories/Product/ProductRepository.php b/packages/Webkul/Velocity/src/Repositories/Product/ProductRepository.php index 4a97216e7..581b9bbdb 100644 --- a/packages/Webkul/Velocity/src/Repositories/Product/ProductRepository.php +++ b/packages/Webkul/Velocity/src/Repositories/Product/ProductRepository.php @@ -105,7 +105,7 @@ class ProductRepository extends Repository */ public function searchProductsFromCategory($params) { - $term = $params['term']; + $term = $params['term'] ?? ''; $categoryId = $params['category']; $results = app(ProductFlatRepository::class)->scopeQuery(function($query) use($term, $categoryId, $params) { From 8867eccd9096638ed594569611371b27aee6bca1 Mon Sep 17 00:00:00 2001 From: phillipcodes <57101430+phillipcodes@users.noreply.github.com> Date: Fri, 5 Jun 2020 11:59:52 +0200 Subject: [PATCH 07/61] fix typo --- .../Webkul/Admin/src/Resources/views/cms/create.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/Webkul/Admin/src/Resources/views/cms/create.blade.php b/packages/Webkul/Admin/src/Resources/views/cms/create.blade.php index 79615501e..efc134cab 100644 --- a/packages/Webkul/Admin/src/Resources/views/cms/create.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/cms/create.blade.php @@ -118,10 +118,10 @@ height: 200, width: "100%", plugins: 'image imagetools media wordcount save fullscreen code table lists link hr', - toolbar1: 'formatselect | bold italic strikethrough forecolor backcolor alignleft aligncenter alignright alignjustif| link hr |numlist bullist outdent indent | removeformat | code | table', + toolbar1: 'formatselect | bold italic strikethrough forecolor backcolor alignleft aligncenter alignright alignjustify | link hr |numlist bullist outdent indent | removeformat | code | table', image_advtab: true, valid_elements : '*[*]' }); }); -@endpush \ No newline at end of file +@endpush From d5a803cf14f13679451ed8f867f15d43faa326ea Mon Sep 17 00:00:00 2001 From: Pranshu Tomar Date: Fri, 5 Jun 2020 16:17:53 +0530 Subject: [PATCH 08/61] Fixed typo in customer group price migration --- ..._05_21_171500_create_product_customer_group_prices_table.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/Webkul/Product/src/Database/Migrations/2020_05_21_171500_create_product_customer_group_prices_table.php b/packages/Webkul/Product/src/Database/Migrations/2020_05_21_171500_create_product_customer_group_prices_table.php index 90127df89..5c9271f78 100644 --- a/packages/Webkul/Product/src/Database/Migrations/2020_05_21_171500_create_product_customer_group_prices_table.php +++ b/packages/Webkul/Product/src/Database/Migrations/2020_05_21_171500_create_product_customer_group_prices_table.php @@ -22,7 +22,7 @@ class CreateProductCustomerGroupPricesTable extends Migration $table->integer('product_id')->unsigned(); $table->foreign('product_id')->references('id')->on('products')->onDelete('cascade'); - $table->integer('customer_group_id')->nullble()->unsigned(); + $table->integer('customer_group_id')->unsigned()->nullable(); $table->foreign('customer_group_id')->references('id')->on('customer_groups')->onDelete('cascade'); $table->timestamps(); }); From 502beab0dd86d8ba73177ca57d533021eba3567a Mon Sep 17 00:00:00 2001 From: Pranshu Tomar Date: Fri, 5 Jun 2020 16:23:09 +0530 Subject: [PATCH 09/61] Issue #3171 fixed --- packages/Webkul/Product/src/Type/AbstractType.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/Webkul/Product/src/Type/AbstractType.php b/packages/Webkul/Product/src/Type/AbstractType.php index 6707df257..df3e84172 100644 --- a/packages/Webkul/Product/src/Type/AbstractType.php +++ b/packages/Webkul/Product/src/Type/AbstractType.php @@ -605,8 +605,8 @@ abstract class AbstractType } if ($price->value < $lastPrice) { - if ($price->value_type == 'percentage') { - $lastPrice = $product->price * ($price->value / 100); + if ($price->value_type == 'discount') { + $lastPrice = $product->price - ($product->price * $price->value) / 100; } else { $lastPrice = $price->value; } From 31b9ae7e3e78c90e5ff8cdd819664fb9b88d3571 Mon Sep 17 00:00:00 2001 From: Pranshu Tomar Date: Fri, 5 Jun 2020 18:41:38 +0530 Subject: [PATCH 10/61] Issue #3070 fixed --- .../views/catalog/attributes/create.blade.php | 6 +++--- .../Resources/views/catalog/attributes/edit.blade.php | 11 ++++++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/packages/Webkul/Admin/src/Resources/views/catalog/attributes/create.blade.php b/packages/Webkul/Admin/src/Resources/views/catalog/attributes/create.blade.php index a52168b11..7626ffdd2 100755 --- a/packages/Webkul/Admin/src/Resources/views/catalog/attributes/create.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/catalog/attributes/create.blade.php @@ -309,7 +309,7 @@ @foreach (app('Webkul\Core\Repositories\LocaleRepository')->all() as $locale)
- + @{{ errors.first(localeInputName(row, '{!! $locale->code !!}')) }}
@@ -383,10 +383,10 @@ addOptionRow: function (isNullOptionRow) { const rowCount = this.optionRowCount++; const id = 'option_' + rowCount; - let row = {'id': id}; + let row = {'id': id, 'locales': {}}; @foreach (app('Webkul\Core\Repositories\LocaleRepository')->all() as $locale) - row['{{ $locale->code }}'] = ''; + row['locales']['{{ $locale->code }}'] = ''; @endforeach row['notRequired'] = ''; diff --git a/packages/Webkul/Admin/src/Resources/views/catalog/attributes/edit.blade.php b/packages/Webkul/Admin/src/Resources/views/catalog/attributes/edit.blade.php index 941d9a714..5a4a4f707 100755 --- a/packages/Webkul/Admin/src/Resources/views/catalog/attributes/edit.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/catalog/attributes/edit.blade.php @@ -379,7 +379,7 @@ @foreach (app('Webkul\Core\Repositories\LocaleRepository')->all() as $locale)
- + @{{ errors.first(localeInputName(row, '{!! $locale->code !!}')) }}
@@ -434,7 +434,8 @@ 'sort_order': @json($option->sort_order), 'swatch_value': @json($option->swatch_value), 'swatch_value_url': @json($option->swatch_value_url), - 'notRequired': '' + 'notRequired': '', + 'locales': {} }; @if (empty($option->label)) @@ -444,7 +445,7 @@ @endif @foreach (app('Webkul\Core\Repositories\LocaleRepository')->all() as $locale) - row['{{ $locale->code }}'] = @json($option->translate($locale->code)['label'] ?? ''); + row['locales']['{{ $locale->code }}'] = @json($option->translate($locale->code)['label'] ?? ''); @endforeach this.optionRows.push(row); @@ -465,10 +466,10 @@ addOptionRow: function (isNullOptionRow) { const rowCount = this.optionRowCount++; const id = 'option_' + rowCount; - let row = {'id': id}; + let row = {'id': id, 'locales': {}}; @foreach (app('Webkul\Core\Repositories\LocaleRepository')->all() as $locale) - row['{{ $locale->code }}'] = ''; + row['locales']['{{ $locale->code }}'] = ''; @endforeach row['notRequired'] = ''; From bd8315dafb401259d84600560dd0b41cea43c8c0 Mon Sep 17 00:00:00 2001 From: Shubham Mehrotra Date: Fri, 5 Jun 2020 19:39:48 +0530 Subject: [PATCH 11/61] minified jquery-ez-plus file --- .../publishable/assets/js/jquery.ez-plus.js | 1860 +---------------- 1 file changed, 1 insertion(+), 1859 deletions(-) diff --git a/packages/Webkul/Velocity/publishable/assets/js/jquery.ez-plus.js b/packages/Webkul/Velocity/publishable/assets/js/jquery.ez-plus.js index cf1ecf0b6..35c6d36a0 100644 --- a/packages/Webkul/Velocity/publishable/assets/js/jquery.ez-plus.js +++ b/packages/Webkul/Velocity/publishable/assets/js/jquery.ez-plus.js @@ -1,1859 +1 @@ -/* jshint -W071, -W074 */ -/* global jQuery:false */ - -/* Disabled options are: - * W071: This function has too many statements - * W074: This function's cyclomatic complexity is too high - */ - -/* - * jQuery ezPlus 1.1.6 - * Demo's and documentation: - * http://igorlino.github.io/elevatezoom-plus/ - * - * licensed under MIT license. - * http://en.wikipedia.org/wiki/MIT_License - * - */ - -if (typeof Object.create !== 'function') { - Object.create = function (obj) { - function F() { - } - - F.prototype = obj; - return new F(); - }; -} - -(function ($, window, document, undefined) { - var EZP = { - init: function (options, elem) { - var self = this; - var $galleries; - - self.elem = elem; - self.$elem = $(elem); - - self.imageSrc = self.$elem.data('zoom-image') ? self.$elem.data('zoom-image') : self.$elem.attr('src'); - - self.options = $.extend({}, $.fn.ezPlus.options, self.responsiveConfig(options || {})); - - if (!self.options.enabled) { - return; - } - - //TINT OVERRIDE SETTINGS - if (self.options.tint) { - self.options.lensColour = 'none'; //colour of the lens background - self.options.lensOpacity = '1'; //opacity of the lens - } - //INNER OVERRIDE SETTINGS - if (self.options.zoomType === 'inner') { - self.options.showLens = false; - } - - //Remove alt on hover - - self.$elem.parent().removeAttr('title').removeAttr('alt'); - - self.zoomImage = self.imageSrc; - - self.refresh(1); - - //Create the image swap from the gallery - $galleries = $(self.options.gallery ? ('#' + self.options.gallery) : self.options.gallerySelector); - $galleries.on('click.zoom', self.options.galleryItem, function (e) { - - //Set a class on the currently active gallery image - if (self.options.galleryActiveClass) { - $(self.options.galleryItem, $galleries).removeClass(self.options.galleryActiveClass); - $(this).addClass(self.options.galleryActiveClass); - } - //stop any link on the a tag from working - if (this.tagName === 'A') { - e.preventDefault(); - } - - //call the swap image function - if ($(this).data('zoom-image')) { - self.zoomImagePre = $(this).data('zoom-image'); - } - else { - self.zoomImagePre = $(this).data('image'); - } - self.swaptheimage($(this).data('image'), self.zoomImagePre); - if (this.tagName === 'A') { - return false; - } - }); - }, - refresh: function (length) { - var self = this; - - setTimeout(function () { - self.fetch(self.imageSrc); - - }, length || self.options.refresh); - }, - fetch: function (imgsrc) { - //get the image - var self = this; - var newImg = new Image(); - newImg.onload = function () { - //set the large image dimensions - used to calculte ratio's - self.largeWidth = newImg.width; - self.largeHeight = newImg.height; - //once image is loaded start the calls - self.startZoom(); - self.currentImage = self.imageSrc; - //let caller know image has been loaded - self.options.onZoomedImageLoaded(self.$elem); - }; - self.setImageSource(newImg, imgsrc); // this must be done AFTER setting onload - - return; - }, - setImageSource: function (image, src) { - //sets an image's source. - image.src = src; - }, - startZoom: function () { - var self = this; - //get dimensions of the non zoomed image - self.nzWidth = self.$elem.width(); - self.nzHeight = self.$elem.height(); - - //activated elements - self.isWindowActive = false; - self.isLensActive = false; - self.isTintActive = false; - self.overWindow = false; - - //CrossFade Wrapper - if (self.options.imageCrossfade) { - self.zoomWrap = self.$elem.wrap('
'); - self.$elem.css('position', 'absolute'); - } - - self.zoomLock = 1; - self.scrollingLock = false; - self.changeBgSize = false; - self.currentZoomLevel = self.options.zoomLevel; - - //get offset of the non zoomed image - self.nzOffset = self.$elem.offset(); - //calculate the width ratio of the large/small image - self.widthRatio = (self.largeWidth / self.currentZoomLevel) / self.nzWidth; - self.heightRatio = (self.largeHeight / self.currentZoomLevel) / self.nzHeight; - - function getWindowZoomStyle() { - return 'overflow: hidden;' + - 'background-position: 0px 0px;text-align:center;' + - 'background-color: ' + String(self.options.zoomWindowBgColour) + ';' + - 'width: ' + String(self.options.zoomWindowWidth) + 'px;' + - 'height: ' + String(self.options.zoomWindowHeight) + 'px;' + - 'float: left;' + - 'background-size: ' + self.largeWidth / self.currentZoomLevel + 'px ' + self.largeHeight / self.currentZoomLevel + 'px;' + - 'display: none;z-index:100;' + - 'border: ' + String(self.options.borderSize) + 'px solid ' + self.options.borderColour + ';' + - 'background-repeat: no-repeat;' + - 'position: absolute;'; - } - - //if window zoom - if (self.options.zoomType === 'window') { - self.zoomWindowStyle = getWindowZoomStyle(); - } - - function getInnerZoomStyle() { - //has a border been put on the image? Lets cater for this - var borderWidth = self.$elem.css('border-left-width'); - - return 'overflow: hidden;' + - 'margin-left: ' + String(borderWidth) + ';' + - 'margin-top: ' + String(borderWidth) + ';' + - 'background-position: 0px 0px;' + - 'width: ' + String(self.nzWidth) + 'px;' + - 'height: ' + String(self.nzHeight) + 'px;' + - 'float: left;' + - 'display: none;' + - 'cursor:' + (self.options.cursor) + ';' + - 'px solid ' + self.options.borderColour + ';' + - 'background-repeat: no-repeat;' + - 'position: absolute;'; - } - - //if inner zoom - if (self.options.zoomType === 'inner') { - self.zoomWindowStyle = getInnerZoomStyle(); - } - - function getWindowLensStyle() { - var lensHeight, lensWidth; - // adjust images less than the window height - - if (self.nzHeight < self.options.zoomWindowHeight / self.heightRatio) { - lensHeight = self.nzHeight; - } - else { - lensHeight = String(self.options.zoomWindowHeight / self.heightRatio); - } - if (self.largeWidth < self.options.zoomWindowWidth) { - lensWidth = self.nzWidth; - } - else { - lensWidth = String(self.options.zoomWindowWidth / self.widthRatio); - } - - return 'background-position: 0px 0px;width: ' + String((self.options.zoomWindowWidth) / self.widthRatio) + 'px;' + - 'height: ' + String((self.options.zoomWindowHeight) / self.heightRatio) + - 'px;float: right;display: none;' + - 'overflow: hidden;' + - 'z-index: 999;' + - 'opacity:' + (self.options.lensOpacity) + ';filter: alpha(opacity = ' + (self.options.lensOpacity * 100) + '); zoom:1;' + - 'width:' + lensWidth + 'px;' + - 'height:' + lensHeight + 'px;' + - 'background-color:' + (self.options.lensColour) + ';' + - 'cursor:' + (self.options.cursor) + ';' + - 'border: ' + (self.options.lensBorderSize) + 'px' + - ' solid ' + (self.options.lensBorderColour) + ';background-repeat: no-repeat;position: absolute;'; - } - - //lens style for window zoom - if (self.options.zoomType === 'window') { - self.lensStyle = getWindowLensStyle(); - } - - //tint style - self.tintStyle = 'display: block;' + - 'position: absolute;' + - 'background-color: ' + self.options.tintColour + ';' + - 'filter:alpha(opacity=0);' + - 'opacity: 0;' + - 'width: ' + self.nzWidth + 'px;' + - 'height: ' + self.nzHeight + 'px;'; - - //lens style for lens zoom with optional round for modern browsers - self.lensRound = ''; - - if (self.options.zoomType === 'lens') { - self.lensStyle = 'background-position: 0px 0px;' + - 'float: left;display: none;' + - 'border: ' + String(self.options.borderSize) + 'px solid ' + self.options.borderColour + ';' + - 'width:' + String(self.options.lensSize) + 'px;' + - 'height:' + String(self.options.lensSize) + 'px;' + - 'background-repeat: no-repeat;position: absolute;'; - } - - //does not round in all browsers - if (self.options.lensShape === 'round') { - self.lensRound = 'border-top-left-radius: ' + String(self.options.lensSize / 2 + self.options.borderSize) + 'px;' + - 'border-top-right-radius: ' + String(self.options.lensSize / 2 + self.options.borderSize) + 'px;' + - 'border-bottom-left-radius: ' + String(self.options.lensSize / 2 + self.options.borderSize) + 'px;' + - 'border-bottom-right-radius: ' + String(self.options.lensSize / 2 + self.options.borderSize) + 'px;'; - } - - //create the div's + "" - //self.zoomContainer = $('
').addClass('zoomContainer').css({"position":"relative", "height":self.nzHeight, "width":self.nzWidth}); - - self.zoomContainer = - $('
'); - $(self.options.zoomContainerAppendTo).append(self.zoomContainer); - - //this will add overflow hidden and contrain the lens on lens mode - if (self.options.containLensZoom && self.options.zoomType === 'lens') { - self.zoomContainer.css('overflow', 'hidden'); - } - if (self.options.zoomType !== 'inner') { - self.zoomLens = $('
 
') - .appendTo(self.zoomContainer) - .click(function () { - self.$elem.trigger('click'); - }); - - if (self.options.tint) { - self.tintContainer = $('
').addClass('tintContainer'); - self.zoomTint = $('
'); - - self.zoomLens.wrap(self.tintContainer); - - self.zoomTintcss = self.zoomLens.after(self.zoomTint); - - //if tint enabled - set an image to show over the tint - - self.zoomTintImage = $('') - .appendTo(self.zoomLens) - .click(function () { - - self.$elem.trigger('click'); - }); - } - } - - var targetZoomContainer = isNaN(self.options.zoomWindowPosition) ? 'body' : self.zoomContainer; - //create zoom window - self.zoomWindow = $('
 
') - .appendTo(targetZoomContainer).click(function () { - self.$elem.trigger('click'); - }); - self.zoomWindowContainer = $('
').addClass('zoomWindowContainer').css('width', self.options.zoomWindowWidth); - self.zoomWindow.wrap(self.zoomWindowContainer); - - // self.captionStyle = "text-align: left;background-color: black;'+ - // 'color: white;font-weight: bold;padding: 10px;font-family: sans-serif;font-size: 11px"; - // self.zoomCaption = $('
INSERT ALT TAG
').appendTo(self.zoomWindow.parent()); - - if (self.options.zoomType === 'lens') { - self.zoomLens.css('background-image', 'url("' + self.imageSrc + '")'); - } - if (self.options.zoomType === 'window') { - self.zoomWindow.css('background-image', 'url("' + self.imageSrc + '")'); - } - if (self.options.zoomType === 'inner') { - self.zoomWindow.css('background-image', 'url("' + self.imageSrc + '")'); - } - - /*-------------------END THE ZOOM WINDOW AND LENS----------------------------------*/ - if (self.options.touchEnabled) { - //touch events - self.$elem.bind('touchmove', function (e) { - e.preventDefault(); - var touch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0]; - self.setPosition(touch); - }); - self.zoomContainer.bind('touchmove', function (e) { - if (self.options.zoomType === 'inner') { - self.showHideWindow('show'); - - } - e.preventDefault(); - var touch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0]; - self.setPosition(touch); - - }); - self.zoomContainer.bind('touchend', function (e) { - self.showHideWindow('hide'); - if (self.options.showLens) { - self.showHideLens('hide'); - } - if (self.options.tint && self.options.zoomType !== 'inner') { - self.showHideTint('hide'); - } - }); - - self.$elem.bind('touchend', function (e) { - self.showHideWindow('hide'); - if (self.options.showLens) { - self.showHideLens('hide'); - } - if (self.options.tint && self.options.zoomType !== 'inner') { - self.showHideTint('hide'); - } - }); - if (self.options.showLens) { - self.zoomLens.bind('touchmove', function (e) { - - e.preventDefault(); - var touch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0]; - self.setPosition(touch); - }); - - self.zoomLens.bind('touchend', function (e) { - self.showHideWindow('hide'); - if (self.options.showLens) { - self.showHideLens('hide'); - } - if (self.options.tint && self.options.zoomType !== 'inner') { - self.showHideTint('hide'); - } - }); - } - } - //Needed to work in IE - self.$elem.bind('mousemove', function (e) { - if (self.overWindow === false) { - self.setElements('show'); - } - //make sure on orientation change the setposition is not fired - if (self.lastX !== e.clientX || self.lastY !== e.clientY) { - self.setPosition(e); - self.currentLoc = e; - } - self.lastX = e.clientX; - self.lastY = e.clientY; - - }); - - self.zoomContainer.bind('click', self.options.onImageClick); - - self.zoomContainer.bind('mousemove', function (e) { - if (self.overWindow === false) { - self.setElements('show'); - } - mouseMoveZoomHandler(e); - }); - - function mouseMoveZoomHandler(e) { - //self.overWindow = true; - //make sure on orientation change the setposition is not fired - if (self.lastX !== e.clientX || self.lastY !== e.clientY) { - self.setPosition(e); - self.currentLoc = e; - } - self.lastX = e.clientX; - self.lastY = e.clientY; - } - - var elementToTrack = null; - if (self.options.zoomType !== 'inner') { - elementToTrack = self.zoomLens; - } - if (self.options.tint && self.options.zoomType !== 'inner') { - elementToTrack = self.zoomTint; - } - if (self.options.zoomType === 'inner') { - elementToTrack = self.zoomWindow; - } - - //register the mouse tracking - if (elementToTrack) { - elementToTrack.bind('mousemove', mouseMoveZoomHandler); - } - - // lensFadeOut: 500, zoomTintFadeIn - self.zoomContainer.add(self.$elem).mouseenter(function () { - if (self.overWindow === false) { - self.setElements('show'); - } - }).mouseleave(function () { - if (!self.scrollLock) { - self.setElements('hide'); - self.options.onDestroy(self.$elem); - } - }); - //end ove image - - if (self.options.zoomType !== 'inner') { - self.zoomWindow.mouseenter(function () { - self.overWindow = true; - self.setElements('hide'); - }).mouseleave(function () { - self.overWindow = false; - }); - } - //end ove image - - // var delta = parseInt(e.originalEvent.wheelDelta || -e.originalEvent.detail); - - // $(this).empty(); - // return false; - - //fix for initial zoom setting - //if (self.options.zoomLevel !== 1) { - // self.changeZoomLevel(self.currentZoomLevel); - //} - //set the min zoomlevel - if (self.options.minZoomLevel) { - self.minZoomLevel = self.options.minZoomLevel; - } - else { - self.minZoomLevel = self.options.scrollZoomIncrement * 2; - } - - if (self.options.scrollZoom) { - self.zoomContainer.add(self.$elem).bind('wheel DOMMouseScroll MozMousePixelScroll', function (e) { - // in IE there is issue with firing of mouseleave - So check whether still scrolling - // and on mouseleave check if scrolllock - self.scrollLock = true; - clearTimeout($.data(this, 'timer')); - $.data(this, 'timer', setTimeout(function () { - self.scrollLock = false; - //do something - }, 250)); - - var theEvent = e.originalEvent.deltaY || e.originalEvent.detail * -1; - - //this.scrollTop += ( delta < 0 ? 1 : -1 ) * 30; - // e.preventDefault(); - - e.stopImmediatePropagation(); - e.stopPropagation(); - e.preventDefault(); - - if (theEvent / 120 > 0) { - //scrolling up - if (self.currentZoomLevel >= self.minZoomLevel) { - self.changeZoomLevel(self.currentZoomLevel - self.options.scrollZoomIncrement); - } - } - else { - //scrolling down - - //Check if it has to maintain original zoom window aspect ratio or not - if ((!self.fullheight && !self.fullwidth) || !self.options.mantainZoomAspectRatio) { - if (self.options.maxZoomLevel) { - if (self.currentZoomLevel <= self.options.maxZoomLevel) { - self.changeZoomLevel(parseFloat(self.currentZoomLevel) + self.options.scrollZoomIncrement); - } - } - else { - //andy - self.changeZoomLevel(parseFloat(self.currentZoomLevel) + self.options.scrollZoomIncrement); - } - } - } - return false; - }); - } - }, - setElements: function (type) { - var self = this; - if (!self.options.zoomEnabled) { - return false; - } - if (type === 'show') { - if (self.isWindowSet) { - if (self.options.zoomType === 'inner') { - self.showHideWindow('show'); - } - if (self.options.zoomType === 'window') { - self.showHideWindow('show'); - } - if (self.options.showLens) { - self.showHideLens('show'); - } - if (self.options.tint && self.options.zoomType !== 'inner') { - self.showHideTint('show'); - } - } - } - - if (type === 'hide') { - if (self.options.zoomType === 'window') { - self.showHideWindow('hide'); - } - if (!self.options.tint) { - self.showHideWindow('hide'); - } - if (self.options.showLens) { - self.showHideLens('hide'); - } - if (self.options.tint) { - self.showHideTint('hide'); - } - } - }, - setPosition: function (e) { - - var self = this; - - if (!self.options.zoomEnabled) { - return false; - } - - //recaclc offset each time in case the image moves - //this can be caused by other on page elements - self.nzHeight = self.$elem.height(); - self.nzWidth = self.$elem.width(); - self.nzOffset = self.$elem.offset(); - - if (self.options.tint && self.options.zoomType !== 'inner') { - self.zoomTint.css({ - top: 0, - left: 0 - }); - } - //set responsive - //will checking if the image needs changing before running this code work faster? - if (self.options.responsive && !self.options.scrollZoom) { - if (self.options.showLens) { - var lensHeight, lensWidth; - if (self.nzHeight < self.options.zoomWindowWidth / self.widthRatio) { - lensHeight = self.nzHeight; - } - else { - lensHeight = String((self.options.zoomWindowHeight / self.heightRatio)); - } - if (self.largeWidth < self.options.zoomWindowWidth) { - lensWidth = self.nzWidth; - } - else { - lensWidth = (self.options.zoomWindowWidth / self.widthRatio); - } - self.widthRatio = self.largeWidth / self.nzWidth; - self.heightRatio = self.largeHeight / self.nzHeight; - if (self.options.zoomType !== 'lens') { - //possibly dont need to keep recalcalculating - //if the lens is heigher than the image, then set lens size to image size - if (self.nzHeight < self.options.zoomWindowWidth / self.widthRatio) { - lensHeight = self.nzHeight; - - } - else { - lensHeight = String((self.options.zoomWindowHeight / self.heightRatio)); - } - - if (self.nzWidth < self.options.zoomWindowHeight / self.heightRatio) { - lensWidth = self.nzWidth; - } - else { - lensWidth = String((self.options.zoomWindowWidth / self.widthRatio)); - } - - self.zoomLens.css({ - 'width': lensWidth, - 'height': lensHeight - }); - - if (self.options.tint) { - self.zoomTintImage.css({ - 'width': self.nzWidth, - 'height': self.nzHeight - }); - } - - } - if (self.options.zoomType === 'lens') { - self.zoomLens.css({ - width: String(self.options.lensSize) + 'px', - height: String(self.options.lensSize) + 'px' - }); - } - //end responsive image change - } - } - - //container fix - self.zoomContainer.css({ - top: self.nzOffset.top, - left: self.nzOffset.left - }); - self.mouseLeft = parseInt(e.pageX - self.nzOffset.left); - self.mouseTop = parseInt(e.pageY - self.nzOffset.top); - //calculate the Location of the Lens - - //calculate the bound regions - but only if zoom window - if (self.options.zoomType === 'window') { - var zoomLensHeight = self.zoomLens.height() / 2; - var zoomLensWidth = self.zoomLens.width() / 2; - self.Etoppos = (self.mouseTop < 0 + zoomLensHeight); - self.Eboppos = (self.mouseTop > self.nzHeight - zoomLensHeight - (self.options.lensBorderSize * 2)); - self.Eloppos = (self.mouseLeft < 0 + zoomLensWidth); - self.Eroppos = (self.mouseLeft > (self.nzWidth - zoomLensWidth - (self.options.lensBorderSize * 2))); - } - //calculate the bound regions - but only for inner zoom - if (self.options.zoomType === 'inner') { - self.Etoppos = (self.mouseTop < ((self.nzHeight / 2) / self.heightRatio)); - self.Eboppos = (self.mouseTop > (self.nzHeight - ((self.nzHeight / 2) / self.heightRatio))); - self.Eloppos = (self.mouseLeft < 0 + (((self.nzWidth / 2) / self.widthRatio))); - self.Eroppos = (self.mouseLeft > (self.nzWidth - (self.nzWidth / 2) / self.widthRatio - (self.options.lensBorderSize * 2))); - } - - // if the mouse position of the slider is one of the outerbounds, then hide window and lens - if (self.mouseLeft < 0 || self.mouseTop < 0 || self.mouseLeft > self.nzWidth || self.mouseTop > self.nzHeight) { - self.setElements('hide'); - return; - } - //else continue with operations - else { - //lens options - if (self.options.showLens) { - // self.showHideLens('show'); - //set background position of lens - self.lensLeftPos = String(Math.floor(self.mouseLeft - self.zoomLens.width() / 2)); - self.lensTopPos = String(Math.floor(self.mouseTop - self.zoomLens.height() / 2)); - } - //adjust the background position if the mouse is in one of the outer regions - - //Top region - if (self.Etoppos) { - self.lensTopPos = 0; - } - //Left Region - if (self.Eloppos) { - self.windowLeftPos = 0; - self.lensLeftPos = 0; - self.tintpos = 0; - } - //Set bottom and right region for window mode - if (self.options.zoomType === 'window') { - if (self.Eboppos) { - self.lensTopPos = Math.max((self.nzHeight) - self.zoomLens.height() - (self.options.lensBorderSize * 2), 0); - } - if (self.Eroppos) { - self.lensLeftPos = (self.nzWidth - (self.zoomLens.width()) - (self.options.lensBorderSize * 2)); - } - } - //Set bottom and right region for inner mode - if (self.options.zoomType === 'inner') { - if (self.Eboppos) { - self.lensTopPos = Math.max(((self.nzHeight) - (self.options.lensBorderSize * 2)), 0); - } - if (self.Eroppos) { - self.lensLeftPos = (self.nzWidth - (self.nzWidth) - (self.options.lensBorderSize * 2)); - } - } - //if lens zoom - if (self.options.zoomType === 'lens') { - - self.windowLeftPos = String(((e.pageX - self.nzOffset.left) * self.widthRatio - self.zoomLens.width() / 2) * (-1)); - self.windowTopPos = String(((e.pageY - self.nzOffset.top) * self.heightRatio - self.zoomLens.height() / 2) * (-1)); - self.zoomLens.css('background-position', self.windowLeftPos + 'px ' + self.windowTopPos + 'px'); - - if (self.changeBgSize) { - if (self.nzHeight > self.nzWidth) { - if (self.options.zoomType === 'lens') { - self.zoomLens.css('background-size', - self.largeWidth / self.newvalueheight + 'px ' + - self.largeHeight / self.newvalueheight + 'px'); - } - - self.zoomWindow.css('background-size', - self.largeWidth / self.newvalueheight + 'px ' + - self.largeHeight / self.newvalueheight + 'px'); - } - else { - if (self.options.zoomType === 'lens') { - self.zoomLens.css('background-size', - self.largeWidth / self.newvaluewidth + 'px ' + - self.largeHeight / self.newvaluewidth + 'px'); - } - self.zoomWindow.css('background-size', - self.largeWidth / self.newvaluewidth + 'px ' + - self.largeHeight / self.newvaluewidth + 'px'); - } - self.changeBgSize = false; - } - - self.setWindowPosition(e); - } - //if tint zoom - if (self.options.tint && self.options.zoomType !== 'inner') { - self.setTintPosition(e); - } - //set the css background position - if (self.options.zoomType === 'window') { - self.setWindowPosition(e); - } - if (self.options.zoomType === 'inner') { - self.setWindowPosition(e); - } - if (self.options.showLens) { - if (self.fullwidth && self.options.zoomType !== 'lens') { - self.lensLeftPos = 0; - } - self.zoomLens.css({ - left: self.lensLeftPos + 'px', - top: self.lensTopPos + 'px' - }); - } - - } //end else - }, - showHideZoomContainer: function (change) { - var self = this; - if (change === 'show') { - if (self.zoomContainer) { - self.zoomContainer.show(); - } - } - if (change === 'hide') { - if (self.zoomContainer) { - self.zoomContainer.hide(); - } - } - }, - showHideWindow: function (change) { - var self = this; - if (change === 'show') { - if (!self.isWindowActive && self.zoomWindow) { - self.options.onShow(self); - if (self.options.zoomWindowFadeIn) { - self.zoomWindow.stop(true, true, false).fadeIn(self.options.zoomWindowFadeIn); - } - else { - self.zoomWindow.show(); - } - self.isWindowActive = true; - } - } - if (change === 'hide') { - if (self.isWindowActive) { - if (self.options.zoomWindowFadeOut) { - self.zoomWindow.stop(true, true).fadeOut(self.options.zoomWindowFadeOut, function () { - if (self.loop) { - //stop moving the zoom window when zoom window is faded out - clearInterval(self.loop); - self.loop = false; - } - }); - } - else { - self.zoomWindow.hide(); - } - self.isWindowActive = false; - } - } - }, - showHideLens: function (change) { - var self = this; - if (change === 'show') { - if (!self.isLensActive) { - if (self.options.lensFadeIn && self.zoomLens) { - self.zoomLens.stop(true, true, false).fadeIn(self.options.lensFadeIn); - } - else { - self.zoomLens.show(); - } - self.isLensActive = true; - } - } - if (change === 'hide') { - if (self.isLensActive) { - if (self.options.lensFadeOut) { - self.zoomLens.stop(true, true).fadeOut(self.options.lensFadeOut); - } - else { - self.zoomLens.hide(); - } - self.isLensActive = false; - } - } - }, - showHideTint: function (change) { - var self = this; - if (change === 'show') { - if (!self.isTintActive && self.zoomTint) { - - if (self.options.zoomTintFadeIn) { - self.zoomTint.css('opacity', self.options.tintOpacity).animate().stop(true, true).fadeIn('slow'); - } - else { - self.zoomTint.css('opacity', self.options.tintOpacity).animate(); - self.zoomTint.show(); - } - self.isTintActive = true; - } - } - if (change === 'hide') { - if (self.isTintActive) { - - if (self.options.zoomTintFadeOut) { - self.zoomTint.stop(true, true).fadeOut(self.options.zoomTintFadeOut); - } - else { - self.zoomTint.hide(); - } - self.isTintActive = false; - } - } - }, - - setLensPosition: function (e) { - }, - - setWindowPosition: function (e) { - //return obj.slice( 0, count ); - var self = this; - - if (!isNaN(self.options.zoomWindowPosition)) { - - switch (self.options.zoomWindowPosition) { - case 1: //done - self.windowOffsetTop = (self.options.zoomWindowOffsetY);//DONE - 1 - self.windowOffsetLeft = (+self.nzWidth); //DONE 1, 2, 3, 4, 16 - break; - case 2: - if (self.options.zoomWindowHeight > self.nzHeight) { //positive margin - - self.windowOffsetTop = ((self.options.zoomWindowHeight / 2) - (self.nzHeight / 2)) * (-1); - self.windowOffsetLeft = (self.nzWidth); //DONE 1, 2, 3, 4, 16 - } - else { //negative margin - $.noop(); - } - break; - case 3: //done - self.windowOffsetTop = (self.nzHeight - self.zoomWindow.height() - (self.options.borderSize * 2)); //DONE 3,9 - self.windowOffsetLeft = (self.nzWidth); //DONE 1, 2, 3, 4, 16 - break; - case 4: //done - self.windowOffsetTop = (self.nzHeight); //DONE - 4,5,6,7,8 - self.windowOffsetLeft = (self.nzWidth); //DONE 1, 2, 3, 4, 16 - break; - case 5: //done - self.windowOffsetTop = (self.nzHeight); //DONE - 4,5,6,7,8 - self.windowOffsetLeft = (self.nzWidth - self.zoomWindow.width() - (self.options.borderSize * 2)); //DONE - 5,15 - break; - case 6: - if (self.options.zoomWindowHeight > self.nzHeight) { //positive margin - self.windowOffsetTop = (self.nzHeight); //DONE - 4,5,6,7,8 - - self.windowOffsetLeft = ((self.options.zoomWindowWidth / 2) - (self.nzWidth / 2) + (self.options.borderSize * 2)) * (-1); - } - else { //negative margin - $.noop(); - } - - break; - case 7: //done - self.windowOffsetTop = (self.nzHeight); //DONE - 4,5,6,7,8 - self.windowOffsetLeft = 0; //DONE 7, 13 - break; - case 8: //done - self.windowOffsetTop = (self.nzHeight); //DONE - 4,5,6,7,8 - self.windowOffsetLeft = (self.zoomWindow.width() + (self.options.borderSize * 2)) * (-1); //DONE 8,9,10,11,12 - break; - case 9: //done - self.windowOffsetTop = (self.nzHeight - self.zoomWindow.height() - (self.options.borderSize * 2)); //DONE 3,9 - self.windowOffsetLeft = (self.zoomWindow.width() + (self.options.borderSize * 2)) * (-1); //DONE 8,9,10,11,12 - break; - case 10: - if (self.options.zoomWindowHeight > self.nzHeight) { //positive margin - - self.windowOffsetTop = ((self.options.zoomWindowHeight / 2) - (self.nzHeight / 2)) * (-1); - self.windowOffsetLeft = (self.zoomWindow.width() + (self.options.borderSize * 2)) * (-1); //DONE 8,9,10,11,12 - } - else { //negative margin - $.noop(); - } - break; - case 11: - self.windowOffsetTop = (self.options.zoomWindowOffsetY); - self.windowOffsetLeft = (self.zoomWindow.width() + (self.options.borderSize * 2)) * (-1); //DONE 8,9,10,11,12 - break; - case 12: //done - self.windowOffsetTop = (self.zoomWindow.height() + (self.options.borderSize * 2)) * (-1); //DONE 12,13,14,15,16 - self.windowOffsetLeft = (self.zoomWindow.width() + (self.options.borderSize * 2)) * (-1); //DONE 8,9,10,11,12 - break; - case 13: //done - self.windowOffsetTop = (self.zoomWindow.height() + (self.options.borderSize * 2)) * (-1); //DONE 12,13,14,15,16 - self.windowOffsetLeft = (0); //DONE 7, 13 - break; - case 14: - if (self.options.zoomWindowHeight > self.nzHeight) { //positive margin - self.windowOffsetTop = (self.zoomWindow.height() + (self.options.borderSize * 2)) * (-1); //DONE 12,13,14,15,16 - - self.windowOffsetLeft = ((self.options.zoomWindowWidth / 2) - (self.nzWidth / 2) + (self.options.borderSize * 2)) * (-1); - } - else { //negative margin - $.noop(); - } - break; - case 15://done - self.windowOffsetTop = (self.zoomWindow.height() + (self.options.borderSize * 2)) * (-1); //DONE 12,13,14,15,16 - self.windowOffsetLeft = (self.nzWidth - self.zoomWindow.width() - (self.options.borderSize * 2)); //DONE - 5,15 - break; - case 16: //done - self.windowOffsetTop = (self.zoomWindow.height() + (self.options.borderSize * 2)) * (-1); //DONE 12,13,14,15,16 - self.windowOffsetLeft = (self.nzWidth); //DONE 1, 2, 3, 4, 16 - break; - default: //done - self.windowOffsetTop = (self.options.zoomWindowOffsetY);//DONE - 1 - self.windowOffsetLeft = (self.nzWidth); //DONE 1, 2, 3, 4, 16 - } - } //end isNAN - else { - //WE CAN POSITION IN A CLASS - ASSUME THAT ANY STRING PASSED IS - self.externalContainer = $('#' + self.options.zoomWindowPosition); - self.externalContainerWidth = self.externalContainer.width(); - self.externalContainerHeight = self.externalContainer.height(); - self.externalContainerOffset = self.externalContainer.offset(); - - self.windowOffsetTop = self.externalContainerOffset.top;//DONE - 1 - self.windowOffsetLeft = self.externalContainerOffset.left; //DONE 1, 2, 3, 4, 16 - - } - self.isWindowSet = true; - self.windowOffsetTop = self.windowOffsetTop + self.options.zoomWindowOffsetY; - self.windowOffsetLeft = self.windowOffsetLeft + self.options.zoomWindowOffsetX; - - self.zoomWindow.css({ - top: self.windowOffsetTop, - left: self.windowOffsetLeft - }); - - if (self.options.zoomType === 'inner') { - self.zoomWindow.css({ - top: 0, - left: 0 - }); - - } - - self.windowLeftPos = String(((e.pageX - self.nzOffset.left) * self.widthRatio - self.zoomWindow.width() / 2) * (-1)); - self.windowTopPos = String(((e.pageY - self.nzOffset.top) * self.heightRatio - self.zoomWindow.height() / 2) * (-1)); - if (self.Etoppos) { - self.windowTopPos = 0; - } - if (self.Eloppos) { - self.windowLeftPos = 0; - } - if (self.Eboppos) { - self.windowTopPos = (self.largeHeight / self.currentZoomLevel - self.zoomWindow.height()) * (-1); - } - if (self.Eroppos) { - self.windowLeftPos = ((self.largeWidth / self.currentZoomLevel - self.zoomWindow.width()) * (-1)); - } - - //stops micro movements - if (self.fullheight) { - self.windowTopPos = 0; - } - if (self.fullwidth) { - self.windowLeftPos = 0; - } - - //set the css background position - if (self.options.zoomType === 'window' || self.options.zoomType === 'inner') { - - if (self.zoomLock === 1) { - //overrides for images not zoomable - if (self.widthRatio <= 1) { - self.windowLeftPos = 0; - } - if (self.heightRatio <= 1) { - self.windowTopPos = 0; - } - } - // adjust images less than the window height - - if (self.options.zoomType === 'window') { - if (self.largeHeight < self.options.zoomWindowHeight) { - self.windowTopPos = 0; - } - if (self.largeWidth < self.options.zoomWindowWidth) { - self.windowLeftPos = 0; - } - } - //set the zoomwindow background position - if (self.options.easing) { - - // if(self.changeZoom){ - // clearInterval(self.loop); - // self.changeZoom = false; - // self.loop = false; - - // } - //set the pos to 0 if not set - if (!self.xp) { - self.xp = 0; - } - if (!self.yp) { - self.yp = 0; - } - //if loop not already started, then run it - if (!self.loop) { - self.loop = setInterval(function () { - //using zeno's paradox - - self.xp += (self.windowLeftPos - self.xp) / self.options.easingAmount; - self.yp += (self.windowTopPos - self.yp) / self.options.easingAmount; - if (self.scrollingLock) { - - clearInterval(self.loop); - self.xp = self.windowLeftPos; - self.yp = self.windowTopPos; - - self.xp = ((e.pageX - self.nzOffset.left) * self.widthRatio - self.zoomWindow.width() / 2) * (-1); - self.yp = (((e.pageY - self.nzOffset.top) * self.heightRatio - self.zoomWindow.height() / 2) * (-1)); - - if (self.changeBgSize) { - if (self.nzHeight > self.nzWidth) { - if (self.options.zoomType === 'lens') { - self.zoomLens.css('background-size', - self.largeWidth / self.newvalueheight + 'px ' + - self.largeHeight / self.newvalueheight + 'px'); - } - self.zoomWindow.css('background-size', - self.largeWidth / self.newvalueheight + 'px ' + - self.largeHeight / self.newvalueheight + 'px'); - } - else { - if (self.options.zoomType !== 'lens') { - self.zoomLens.css('background-size', - self.largeWidth / self.newvaluewidth + 'px ' + - self.largeHeight / self.newvalueheight + 'px'); - } - self.zoomWindow.css('background-size', - self.largeWidth / self.newvaluewidth + 'px ' + - self.largeHeight / self.newvaluewidth + 'px'); - } - - /* - if(!self.bgxp){self.bgxp = self.largeWidth/self.newvalue;} - if(!self.bgyp){self.bgyp = self.largeHeight/self.newvalue ;} - if (!self.bgloop){ - self.bgloop = setInterval(function(){ - - self.bgxp += (self.largeWidth/self.newvalue - self.bgxp) / self.options.easingAmount; - self.bgyp += (self.largeHeight/self.newvalue - self.bgyp) / self.options.easingAmount; - - self.zoomWindow.css('background-size', self.bgxp + 'px ' + self.bgyp + 'px' ); - - - }, 16); - - } - */ - self.changeBgSize = false; - } - - self.zoomWindow.css('background-position', self.windowLeftPos + 'px ' + self.windowTopPos + 'px'); - self.scrollingLock = false; - self.loop = false; - - } - else if (Math.round(Math.abs(self.xp - self.windowLeftPos) + Math.abs(self.yp - self.windowTopPos)) < 1) { - //stops micro movements - clearInterval(self.loop); - self.zoomWindow.css('background-position', self.windowLeftPos + 'px ' + self.windowTopPos + 'px'); - self.loop = false; - } - else { - if (self.changeBgSize) { - if (self.nzHeight > self.nzWidth) { - if (self.options.zoomType === 'lens') { - self.zoomLens.css('background-size', - self.largeWidth / self.newvalueheight + 'px ' + - self.largeHeight / self.newvalueheight + 'px'); - } - self.zoomWindow.css('background-size', - self.largeWidth / self.newvalueheight + 'px ' + - self.largeHeight / self.newvalueheight + 'px'); - } - else { - if (self.options.zoomType !== 'lens') { - self.zoomLens.css('background-size', - self.largeWidth / self.newvaluewidth + 'px ' + - self.largeHeight / self.newvaluewidth + 'px'); - } - self.zoomWindow.css('background-size', - self.largeWidth / self.newvaluewidth + 'px ' + - self.largeHeight / self.newvaluewidth + 'px'); - } - self.changeBgSize = false; - } - - self.zoomWindow.css('background-position', self.xp + 'px ' + self.yp + 'px'); - } - }, 16); - } - } - else { - if (self.changeBgSize) { - if (self.nzHeight > self.nzWidth) { - if (self.options.zoomType === 'lens') { - self.zoomLens.css('background-size', - self.largeWidth / self.newvalueheight + 'px ' + - self.largeHeight / self.newvalueheight + 'px'); - } - - self.zoomWindow.css('background-size', - self.largeWidth / self.newvalueheight + 'px ' + - self.largeHeight / self.newvalueheight + 'px'); - } - else { - if (self.options.zoomType === 'lens') { - self.zoomLens.css('background-size', - self.largeWidth / self.newvaluewidth + 'px ' + - self.largeHeight / self.newvaluewidth + 'px'); - } - if ((self.largeHeight / self.newvaluewidth) < self.options.zoomWindowHeight) { - - self.zoomWindow.css('background-size', - self.largeWidth / self.newvaluewidth + 'px ' + - self.largeHeight / self.newvaluewidth + 'px'); - } - else { - - self.zoomWindow.css('background-size', - self.largeWidth / self.newvalueheight + 'px ' + - self.largeHeight / self.newvalueheight + 'px'); - } - - } - self.changeBgSize = false; - } - - self.zoomWindow.css('background-position', - self.windowLeftPos + 'px ' + - self.windowTopPos + 'px'); - } - } - }, - - setTintPosition: function (e) { - var self = this; - var zoomLensWidth = self.zoomLens.width(); - var zoomLensHeight = self.zoomLens.height(); - self.nzOffset = self.$elem.offset(); - self.tintpos = String(((e.pageX - self.nzOffset.left) - (zoomLensWidth / 2)) * (-1)); - self.tintposy = String(((e.pageY - self.nzOffset.top) - zoomLensHeight / 2) * (-1)); - if (self.Etoppos) { - self.tintposy = 0; - } - if (self.Eloppos) { - self.tintpos = 0; - } - if (self.Eboppos) { - self.tintposy = (self.nzHeight - zoomLensHeight - (self.options.lensBorderSize * 2)) * (-1); - } - if (self.Eroppos) { - self.tintpos = ((self.nzWidth - zoomLensWidth - (self.options.lensBorderSize * 2)) * (-1)); - } - if (self.options.tint) { - //stops micro movements - if (self.fullheight) { - self.tintposy = 0; - - } - if (self.fullwidth) { - self.tintpos = 0; - - } - self.zoomTintImage.css({ - 'left': self.tintpos + 'px', - 'top': self.tintposy + 'px' - }); - } - }, - - swaptheimage: function (smallimage, largeimage) { - var self = this; - var newImg = new Image(); - - if (self.options.loadingIcon) { - self.spinner = $('
'); - self.$elem.after(self.spinner); - } - - self.options.onImageSwap(self.$elem); - - newImg.onload = function () { - self.largeWidth = newImg.width; - self.largeHeight = newImg.height; - self.zoomImage = largeimage; - self.zoomWindow.css('background-size', self.largeWidth + 'px ' + self.largeHeight + 'px'); - - self.swapAction(smallimage, largeimage); - return; - }; - self.setImageSource(newImg, largeimage); // this must be done AFTER setting onload - }, - - swapAction: function (smallimage, largeimage) { - var self = this; - var elemWidth = self.$elem.width(); - var elemHeight = self.$elem.height(); - var newImg2 = new Image(); - newImg2.onload = function () { - //re-calculate values - self.nzHeight = newImg2.height; - self.nzWidth = newImg2.width; - self.options.onImageSwapComplete(self.$elem); - - self.doneCallback(); - return; - }; - self.setImageSource(newImg2, smallimage); - - //reset the zoomlevel to that initially set in options - self.currentZoomLevel = self.options.zoomLevel; - self.options.maxZoomLevel = false; - - //swaps the main image - //self.$elem.attr('src',smallimage); - //swaps the zoom image - if (self.options.zoomType === 'lens') { - self.zoomLens.css('background-image', 'url("' + largeimage + '")'); - } - if (self.options.zoomType === 'window') { - self.zoomWindow.css('background-image', 'url("' + largeimage + '")'); - } - if (self.options.zoomType === 'inner') { - self.zoomWindow.css('background-image', 'url("' + largeimage + '")'); - } - - self.currentImage = largeimage; - - if (self.options.imageCrossfade) { - var oldImg = self.$elem; - var newImg = oldImg.clone(); - self.$elem.attr('src', smallimage); - self.$elem.after(newImg); - newImg.stop(true).fadeOut(self.options.imageCrossfade, function () { - $(this).remove(); - }); - - // if(self.options.zoomType === 'inner'){ - //remove any attributes on the cloned image so we can resize later - self.$elem.width('auto').removeAttr('width'); - self.$elem.height('auto').removeAttr('height'); - // } - - oldImg.fadeIn(self.options.imageCrossfade); - - if (self.options.tint && self.options.zoomType !== 'inner') { - - var oldImgTint = self.zoomTintImage; - var newImgTint = oldImgTint.clone(); - self.zoomTintImage.attr('src', largeimage); - self.zoomTintImage.after(newImgTint); - newImgTint.stop(true).fadeOut(self.options.imageCrossfade, function () { - $(this).remove(); - }); - - oldImgTint.fadeIn(self.options.imageCrossfade); - - //self.zoomTintImage.attr('width',elem.data('image')); - - //resize the tint window - self.zoomTint.css({ - height: elemHeight, - width: elemWidth - }); - } - - self.zoomContainer.css({ - 'height': elemHeight, - 'width': elemWidth - }); - - if (self.options.zoomType === 'inner') { - if (!self.options.constrainType) { - self.zoomWrap.parent().css({ - 'height': elemHeight, - 'width': elemWidth - }); - - self.zoomWindow.css({ - 'height': elemHeight, - 'width': elemWidth - }); - } - } - - if (self.options.imageCrossfade) { - self.zoomWrap.css({ - 'height': elemHeight, - 'width': elemWidth - }); - } - } - else { - self.$elem.attr('src', smallimage); - if (self.options.tint) { - self.zoomTintImage.attr('src', largeimage); - //self.zoomTintImage.attr('width',elem.data('image')); - self.zoomTintImage.attr('height', elemHeight); - //self.zoomTintImage.attr('src') = elem.data('image'); - self.zoomTintImage.css('height', elemHeight); - self.zoomTint.css('height', elemHeight); - - } - self.zoomContainer.css({ - 'height': elemHeight, - 'width': elemWidth - }); - - if (self.options.imageCrossfade) { - self.zoomWrap.css({ - 'height': elemHeight, - 'width': elemWidth - }); - } - } - if (self.options.constrainType) { - - //This will contrain the image proportions - if (self.options.constrainType === 'height') { - - var autoWDimension = { - 'height': self.options.constrainSize, - 'width': 'auto' - }; - self.zoomContainer.css(autoWDimension); - - if (self.options.imageCrossfade) { - self.zoomWrap.css(autoWDimension); - self.constwidth = self.zoomWrap.width(); - } - else { - self.$elem.css(autoWDimension); - self.constwidth = elemWidth; - } - - var constWDim = { - 'height': self.options.constrainSize, - 'width': self.constwidth - }; - if (self.options.zoomType === 'inner') { - - self.zoomWrap.parent().css(constWDim); - self.zoomWindow.css(constWDim); - } - if (self.options.tint) { - self.tintContainer.css(constWDim); - self.zoomTint.css(constWDim); - self.zoomTintImage.css(constWDim); - } - - } - if (self.options.constrainType === 'width') { - var autoHDimension = { - 'height': 'auto', - 'width': self.options.constrainSize - }; - self.zoomContainer.css(autoHDimension); - - if (self.options.imageCrossfade) { - self.zoomWrap.css(autoHDimension); - self.constheight = self.zoomWrap.height(); - } - else { - self.$elem.css(autoHDimension); - self.constheight = elemHeight; - } - - var constHDim = { - 'height': self.constheight, - 'width': self.options.constrainSize - }; - if (self.options.zoomType === 'inner') { - self.zoomWrap.parent().css(constHDim); - self.zoomWindow.css(constHDim); - } - if (self.options.tint) { - self.tintContainer.css(constHDim); - self.zoomTint.css(constHDim); - self.zoomTintImage.css(constHDim); - } - } - } - }, - - doneCallback: function () { - var self = this; - if (self.options.loadingIcon) { - self.spinner.hide(); - } - - self.nzOffset = self.$elem.offset(); - self.nzWidth = self.$elem.width(); - self.nzHeight = self.$elem.height(); - - // reset the zoomlevel back to default - self.currentZoomLevel = self.options.zoomLevel; - - //ratio of the large to small image - self.widthRatio = self.largeWidth / self.nzWidth; - self.heightRatio = self.largeHeight / self.nzHeight; - - //NEED TO ADD THE LENS SIZE FOR ROUND - // adjust images less than the window height - if (self.options.zoomType === 'window') { - var lensHeight, lensWidth; - - if (self.nzHeight < self.options.zoomWindowHeight / self.heightRatio) { - lensHeight = self.nzHeight; - - } - else { - lensHeight = String((self.options.zoomWindowHeight / self.heightRatio)); - } - - if (self.nzWidth < self.options.zoomWindowWidth) { - lensWidth = self.nzWidth; - } - else { - lensWidth = (self.options.zoomWindowWidth / self.widthRatio); - } - - if (self.zoomLens) { - self.zoomLens.css({ - 'width': lensWidth, - 'height': lensHeight - }); - } - } - }, - - getCurrentImage: function () { - var self = this; - return self.zoomImage; - }, - - getGalleryList: function () { - var self = this; - //loop through the gallery options and set them in list for fancybox - self.gallerylist = []; - if (self.options.gallery) { - $('#' + self.options.gallery + ' a').each(function () { - - var imgSrc = ''; - if ($(this).data('zoom-image')) { - imgSrc = $(this).data('zoom-image'); - } - else if ($(this).data('image')) { - imgSrc = $(this).data('image'); - } - //put the current image at the start - if (imgSrc === self.zoomImage) { - self.gallerylist.unshift({ - href: '' + imgSrc + '', - title: $(this).find('img').attr('title') - }); - } - else { - self.gallerylist.push({ - href: '' + imgSrc + '', - title: $(this).find('img').attr('title') - }); - } - }); - } - //if no gallery - return current image - else { - self.gallerylist.push({ - href: '' + self.zoomImage + '', - title: $(this).find('img').attr('title') - }); - } - return self.gallerylist; - }, - - changeZoomLevel: function (value) { - var self = this; - - //flag a zoom, so can adjust the easing during setPosition - self.scrollingLock = true; - - //round to two decimal places - self.newvalue = parseFloat(value).toFixed(2); - var newvalue = self.newvalue; - - //maxwidth & Maxheight of the image - var maxheightnewvalue = self.largeHeight / ((self.options.zoomWindowHeight / self.nzHeight) * self.nzHeight); - var maxwidthtnewvalue = self.largeWidth / ((self.options.zoomWindowWidth / self.nzWidth) * self.nzWidth); - - //calculate new heightratio - if (self.options.zoomType !== 'inner') { - if (maxheightnewvalue <= newvalue) { - self.heightRatio = (self.largeHeight / maxheightnewvalue) / self.nzHeight; - self.newvalueheight = maxheightnewvalue; - self.fullheight = true; - } - else { - self.heightRatio = (self.largeHeight / newvalue) / self.nzHeight; - self.newvalueheight = newvalue; - self.fullheight = false; - } - - // calculate new width ratio - - if (maxwidthtnewvalue <= newvalue) { - self.widthRatio = (self.largeWidth / maxwidthtnewvalue) / self.nzWidth; - self.newvaluewidth = maxwidthtnewvalue; - self.fullwidth = true; - } - else { - self.widthRatio = (self.largeWidth / newvalue) / self.nzWidth; - self.newvaluewidth = newvalue; - self.fullwidth = false; - } - if (self.options.zoomType === 'lens') { - if (maxheightnewvalue <= newvalue) { - self.fullwidth = true; - self.newvaluewidth = maxheightnewvalue; - } else { - self.widthRatio = (self.largeWidth / newvalue) / self.nzWidth; - self.newvaluewidth = newvalue; - - self.fullwidth = false; - } - } - } - - if (self.options.zoomType === 'inner') { - maxheightnewvalue = parseFloat(self.largeHeight / self.nzHeight).toFixed(2); - maxwidthtnewvalue = parseFloat(self.largeWidth / self.nzWidth).toFixed(2); - if (newvalue > maxheightnewvalue) { - newvalue = maxheightnewvalue; - } - if (newvalue > maxwidthtnewvalue) { - newvalue = maxwidthtnewvalue; - } - - if (maxheightnewvalue <= newvalue) { - self.heightRatio = (self.largeHeight / newvalue) / self.nzHeight; - if (newvalue > maxheightnewvalue) { - self.newvalueheight = maxheightnewvalue; - } else { - self.newvalueheight = newvalue; - } - self.fullheight = true; - } - else { - self.heightRatio = (self.largeHeight / newvalue) / self.nzHeight; - - if (newvalue > maxheightnewvalue) { - - self.newvalueheight = maxheightnewvalue; - } else { - self.newvalueheight = newvalue; - } - self.fullheight = false; - } - - if (maxwidthtnewvalue <= newvalue) { - - self.widthRatio = (self.largeWidth / newvalue) / self.nzWidth; - if (newvalue > maxwidthtnewvalue) { - - self.newvaluewidth = maxwidthtnewvalue; - } else { - self.newvaluewidth = newvalue; - } - - self.fullwidth = true; - } - else { - self.widthRatio = (self.largeWidth / newvalue) / self.nzWidth; - self.newvaluewidth = newvalue; - self.fullwidth = false; - } - } //end inner - var scrcontinue = false; - - if (self.options.zoomType === 'inner') { - if (self.nzWidth >= self.nzHeight) { - if (self.newvaluewidth <= maxwidthtnewvalue) { - scrcontinue = true; - } - else { - scrcontinue = false; - self.fullheight = true; - self.fullwidth = true; - } - } - if (self.nzHeight > self.nzWidth) { - if (self.newvaluewidth <= maxwidthtnewvalue) { - scrcontinue = true; - } - else { - scrcontinue = false; - self.fullheight = true; - self.fullwidth = true; - } - } - } - - if (self.options.zoomType !== 'inner') { - scrcontinue = true; - } - - if (scrcontinue) { - self.zoomLock = 0; - self.changeZoom = true; - - //if lens height is less than image height - if (((self.options.zoomWindowHeight) / self.heightRatio) <= self.nzHeight) { - self.currentZoomLevel = self.newvalueheight; - if (self.options.zoomType !== 'lens' && self.options.zoomType !== 'inner') { - self.changeBgSize = true; - self.zoomLens.css('height', String(self.options.zoomWindowHeight / self.heightRatio) + 'px'); - } - if (self.options.zoomType === 'lens' || self.options.zoomType === 'inner') { - self.changeBgSize = true; - } - } - - if ((self.options.zoomWindowWidth / self.widthRatio) <= self.nzWidth) { - if (self.options.zoomType !== 'inner') { - if (self.newvaluewidth > self.newvalueheight) { - self.currentZoomLevel = self.newvaluewidth; - } - } - - if (self.options.zoomType !== 'lens' && self.options.zoomType !== 'inner') { - self.changeBgSize = true; - - self.zoomLens.css('width', String(self.options.zoomWindowWidth / self.widthRatio) + 'px'); - } - if (self.options.zoomType === 'lens' || self.options.zoomType === 'inner') { - self.changeBgSize = true; - } - - } - if (self.options.zoomType === 'inner') { - self.changeBgSize = true; - - if (self.nzWidth > self.nzHeight) { - self.currentZoomLevel = self.newvaluewidth; - } - if (self.nzHeight > self.nzWidth) { - self.currentZoomLevel = self.newvaluewidth; - } - } - } //under - - //sets the boundry change, called in setWindowPos - self.setPosition(self.currentLoc); - // - }, - - closeAll: function () { - var self = this; - if (self.zoomWindow) { - self.zoomWindow.hide(); - } - if (self.zoomLens) { - self.zoomLens.hide(); - } - if (self.zoomTint) { - self.zoomTint.hide(); - } - }, - - changeState: function (value) { - var self = this; - if (value === 'enable') { - self.options.zoomEnabled = true; - } - if (value === 'disable') { - self.options.zoomEnabled = false; - } - }, - - responsiveConfig: function (options) { - if (options.respond && options.respond.length > 0) { - return $.extend({}, options, this.configByScreenWidth(options)); - } - return options; - }, - - configByScreenWidth: function (options) { - var screenWidth = $(window).width(); - - var config = $.grep(options.respond, function (item) { - var range = item.range.split('-'); - return (screenWidth >= range[0]) && (screenWidth <= range[1]); - }); - - if (config.length > 0) { - return config[0]; - } else { - return options; - } - } - }; - - $.fn.ezPlus = function (options) { - return this.each(function () { - var elevate = Object.create(EZP); - - elevate.init(options, this); - - $.data(this, 'ezPlus', elevate); - - }); - }; - - $.fn.ezPlus.options = { - borderColour: '#888', - borderSize: 4, - constrainSize: false, //in pixels the dimensions you want to constrain on - constrainType: false, //width or height - containLensZoom: false, - cursor: 'inherit', // user should set to what they want the cursor as, if they have set a click function - debug: false, - easing: false, - easingAmount: 12, - enabled: true, - - gallery: false, - galleryActiveClass: 'zoomGalleryActive', - gallerySelector: false, - galleryItem: 'a', - - imageCrossfade: false, - - lensBorderColour: '#000', - lensBorderSize: 1, - lensColour: 'white', //colour of the lens background - lensFadeIn: false, - lensFadeOut: false, - lensOpacity: 0.4, //opacity of the lens - lensShape: 'square', //can be 'round' - lensSize: 200, - lenszoom: false, - - loadingIcon: false, //http://www.example.com/spinner.gif - - // This change will allow to decide if you want to decrease - // zoom of one of the dimensions once the other reached it's top value, - // or keep the aspect ratio, default behaviour still being as always, - // allow to continue zooming out, so it keeps retrocompatibility. - mantainZoomAspectRatio: false, - maxZoomLevel: false, - minZoomLevel: false, - - onComplete: $.noop, - onDestroy: $.noop, - onImageClick: $.noop, - onImageSwap: $.noop, - onImageSwapComplete: $.noop, - onShow: $.noop, - onZoomedImageLoaded: $.noop, - - preloading: 1, //by default, load all the images, if 0, then only load images after activated (PLACEHOLDER FOR NEXT VERSION) - respond: [], - responsive: true, - scrollZoom: false, //allow zoom on mousewheel, true to activate - scrollZoomIncrement: 0.1, //steps of the scrollzoom - showLens: true, - tint: false, //enable the tinting - tintColour: '#333', //default tint color, can be anything, red, #ccc, rgb(0,0,0) - tintOpacity: 0.4, //opacity of the tint - touchEnabled: true, - - zoomActivation: 'hover', // Can also be click (PLACEHOLDER FOR NEXT VERSION) - zoomContainerAppendTo: 'body', //zoom container parent selector - zoomLevel: 1, //default zoom level of image - zoomTintFadeIn: false, - zoomTintFadeOut: false, - zoomType: 'window', //window is default, also 'lens' available - - zoomWindowAlwaysShow: false, - zoomWindowBgColour: '#fff', - zoomWindowFadeIn: false, - zoomWindowFadeOut: false, - zoomWindowHeight: 400, - zoomWindowOffsetX: 0, - zoomWindowOffsetY: 0, - zoomWindowPosition: 1, - zoomWindowWidth: 400, - zoomEnabled: true, //false disables zoomwindow from showing - zIndex: 999 - }; - -})(jQuery, window, document); \ No newline at end of file +"function"!=typeof Object.create&&(Object.create=function(o){function i(){}return i.prototype=o,new i}),function(o,i,t,e){var n={init:function(i,t){var e,n=this;n.elem=t,n.$elem=o(t),n.imageSrc=n.$elem.data("zoom-image")?n.$elem.data("zoom-image"):n.$elem.attr("src"),n.options=o.extend({},o.fn.ezPlus.options,n.responsiveConfig(i||{})),n.options.enabled&&(n.options.tint&&(n.options.lensColour="none",n.options.lensOpacity="1"),"inner"===n.options.zoomType&&(n.options.showLens=!1),n.$elem.parent().removeAttr("title").removeAttr("alt"),n.zoomImage=n.imageSrc,n.refresh(1),(e=o(n.options.gallery?"#"+n.options.gallery:n.options.gallerySelector)).on("click.zoom",n.options.galleryItem,function(i){if(n.options.galleryActiveClass&&(o(n.options.galleryItem,e).removeClass(n.options.galleryActiveClass),o(this).addClass(n.options.galleryActiveClass)),"A"===this.tagName&&i.preventDefault(),o(this).data("zoom-image")?n.zoomImagePre=o(this).data("zoom-image"):n.zoomImagePre=o(this).data("image"),n.swaptheimage(o(this).data("image"),n.zoomImagePre),"A"===this.tagName)return!1}))},refresh:function(o){var i=this;setTimeout(function(){i.fetch(i.imageSrc)},o||i.options.refresh)},fetch:function(o){var i=this,t=new Image;t.onload=function(){i.largeWidth=t.width,i.largeHeight=t.height,i.startZoom(),i.currentImage=i.imageSrc,i.options.onZoomedImageLoaded(i.$elem)},i.setImageSource(t,o)},setImageSource:function(o,i){o.src=i},startZoom:function(){var i,t,e,n=this;n.nzWidth=n.$elem.width(),n.nzHeight=n.$elem.height(),n.isWindowActive=!1,n.isLensActive=!1,n.isTintActive=!1,n.overWindow=!1,n.options.imageCrossfade&&(n.zoomWrap=n.$elem.wrap('
'),n.$elem.css("position","absolute")),n.zoomLock=1,n.scrollingLock=!1,n.changeBgSize=!1,n.currentZoomLevel=n.options.zoomLevel,n.nzOffset=n.$elem.offset(),n.widthRatio=n.largeWidth/n.currentZoomLevel/n.nzWidth,n.heightRatio=n.largeHeight/n.currentZoomLevel/n.nzHeight,"window"===n.options.zoomType&&(n.zoomWindowStyle="overflow: hidden;background-position: 0px 0px;text-align:center;background-color: "+String(n.options.zoomWindowBgColour)+";width: "+String(n.options.zoomWindowWidth)+"px;height: "+String(n.options.zoomWindowHeight)+"px;float: left;background-size: "+n.largeWidth/n.currentZoomLevel+"px "+n.largeHeight/n.currentZoomLevel+"px;display: none;z-index:100;border: "+String(n.options.borderSize)+"px solid "+n.options.borderColour+";background-repeat: no-repeat;position: absolute;"),"inner"===n.options.zoomType&&(n.zoomWindowStyle=(i=n.$elem.css("border-left-width"),"overflow: hidden;margin-left: "+String(i)+";margin-top: "+String(i)+";background-position: 0px 0px;width: "+String(n.nzWidth)+"px;height: "+String(n.nzHeight)+"px;float: left;display: none;cursor:"+n.options.cursor+";px solid "+n.options.borderColour+";background-repeat: no-repeat;position: absolute;")),"window"===n.options.zoomType&&(n.lensStyle=(t=n.nzHeight
'),o(n.options.zoomContainerAppendTo).append(n.zoomContainer),n.options.containLensZoom&&"lens"===n.options.zoomType&&n.zoomContainer.css("overflow","hidden"),"inner"!==n.options.zoomType&&(n.zoomLens=o('
 
').appendTo(n.zoomContainer).click(function(){n.$elem.trigger("click")}),n.options.tint&&(n.tintContainer=o("
").addClass("tintContainer"),n.zoomTint=o('
'),n.zoomLens.wrap(n.tintContainer),n.zoomTintcss=n.zoomLens.after(n.zoomTint),n.zoomTintImage=o('').appendTo(n.zoomLens).click(function(){n.$elem.trigger("click")})));var s=isNaN(n.options.zoomWindowPosition)?"body":n.zoomContainer;function h(o){n.lastX===o.clientX&&n.lastY===o.clientY||(n.setPosition(o),n.currentLoc=o),n.lastX=o.clientX,n.lastY=o.clientY}n.zoomWindow=o('
 
').appendTo(s).click(function(){n.$elem.trigger("click")}),n.zoomWindowContainer=o("
").addClass("zoomWindowContainer").css("width",n.options.zoomWindowWidth),n.zoomWindow.wrap(n.zoomWindowContainer),"lens"===n.options.zoomType&&n.zoomLens.css("background-image",'url("'+n.imageSrc+'")'),"window"===n.options.zoomType&&n.zoomWindow.css("background-image",'url("'+n.imageSrc+'")'),"inner"===n.options.zoomType&&n.zoomWindow.css("background-image",'url("'+n.imageSrc+'")'),n.options.touchEnabled&&(n.$elem.bind("touchmove",function(o){o.preventDefault();var i=o.originalEvent.touches[0]||o.originalEvent.changedTouches[0];n.setPosition(i)}),n.zoomContainer.bind("touchmove",function(o){"inner"===n.options.zoomType&&n.showHideWindow("show"),o.preventDefault();var i=o.originalEvent.touches[0]||o.originalEvent.changedTouches[0];n.setPosition(i)}),n.zoomContainer.bind("touchend",function(o){n.showHideWindow("hide"),n.options.showLens&&n.showHideLens("hide"),n.options.tint&&"inner"!==n.options.zoomType&&n.showHideTint("hide")}),n.$elem.bind("touchend",function(o){n.showHideWindow("hide"),n.options.showLens&&n.showHideLens("hide"),n.options.tint&&"inner"!==n.options.zoomType&&n.showHideTint("hide")}),n.options.showLens&&(n.zoomLens.bind("touchmove",function(o){o.preventDefault();var i=o.originalEvent.touches[0]||o.originalEvent.changedTouches[0];n.setPosition(i)}),n.zoomLens.bind("touchend",function(o){n.showHideWindow("hide"),n.options.showLens&&n.showHideLens("hide"),n.options.tint&&"inner"!==n.options.zoomType&&n.showHideTint("hide")}))),n.$elem.bind("mousemove",function(o){!1===n.overWindow&&n.setElements("show"),n.lastX===o.clientX&&n.lastY===o.clientY||(n.setPosition(o),n.currentLoc=o),n.lastX=o.clientX,n.lastY=o.clientY}),n.zoomContainer.bind("click",n.options.onImageClick),n.zoomContainer.bind("mousemove",function(o){!1===n.overWindow&&n.setElements("show"),h(o)});var d=null;"inner"!==n.options.zoomType&&(d=n.zoomLens),n.options.tint&&"inner"!==n.options.zoomType&&(d=n.zoomTint),"inner"===n.options.zoomType&&(d=n.zoomWindow),d&&d.bind("mousemove",h),n.zoomContainer.add(n.$elem).mouseenter(function(){!1===n.overWindow&&n.setElements("show")}).mouseleave(function(){n.scrollLock||(n.setElements("hide"),n.options.onDestroy(n.$elem))}),"inner"!==n.options.zoomType&&n.zoomWindow.mouseenter(function(){n.overWindow=!0,n.setElements("hide")}).mouseleave(function(){n.overWindow=!1}),n.options.minZoomLevel?n.minZoomLevel=n.options.minZoomLevel:n.minZoomLevel=2*n.options.scrollZoomIncrement,n.options.scrollZoom&&n.zoomContainer.add(n.$elem).bind("wheel DOMMouseScroll MozMousePixelScroll",function(i){n.scrollLock=!0,clearTimeout(o.data(this,"timer")),o.data(this,"timer",setTimeout(function(){n.scrollLock=!1},250));var t=i.originalEvent.deltaY||-1*i.originalEvent.detail;return i.stopImmediatePropagation(),i.stopPropagation(),i.preventDefault(),t/120>0?n.currentZoomLevel>=n.minZoomLevel&&n.changeZoomLevel(n.currentZoomLevel-n.options.scrollZoomIncrement):(n.fullheight||n.fullwidth)&&n.options.mantainZoomAspectRatio||(n.options.maxZoomLevel?n.currentZoomLevel<=n.options.maxZoomLevel&&n.changeZoomLevel(parseFloat(n.currentZoomLevel)+n.options.scrollZoomIncrement):n.changeZoomLevel(parseFloat(n.currentZoomLevel)+n.options.scrollZoomIncrement)),!1})},setElements:function(o){if(!this.options.zoomEnabled)return!1;"show"===o&&this.isWindowSet&&("inner"===this.options.zoomType&&this.showHideWindow("show"),"window"===this.options.zoomType&&this.showHideWindow("show"),this.options.showLens&&this.showHideLens("show"),this.options.tint&&"inner"!==this.options.zoomType&&this.showHideTint("show")),"hide"===o&&("window"===this.options.zoomType&&this.showHideWindow("hide"),this.options.tint||this.showHideWindow("hide"),this.options.showLens&&this.showHideLens("hide"),this.options.tint&&this.showHideTint("hide"))},setPosition:function(o){var i,t;if(!this.options.zoomEnabled)return!1;(this.nzHeight=this.$elem.height(),this.nzWidth=this.$elem.width(),this.nzOffset=this.$elem.offset(),this.options.tint&&"inner"!==this.options.zoomType&&this.zoomTint.css({top:0,left:0}),this.options.responsive&&!this.options.scrollZoom)&&(this.options.showLens&&(i=this.nzHeightthis.nzHeight-e-2*this.options.lensBorderSize,this.Eloppos=this.mouseLeft<0+n,this.Eroppos=this.mouseLeft>this.nzWidth-n-2*this.options.lensBorderSize}"inner"===this.options.zoomType&&(this.Etoppos=this.mouseTopthis.nzHeight-this.nzHeight/2/this.heightRatio,this.Eloppos=this.mouseLeft<0+this.nzWidth/2/this.widthRatio,this.Eroppos=this.mouseLeft>this.nzWidth-this.nzWidth/2/this.widthRatio-2*this.options.lensBorderSize),this.mouseLeft<0||this.mouseTop<0||this.mouseLeft>this.nzWidth||this.mouseTop>this.nzHeight?this.setElements("hide"):(this.options.showLens&&(this.lensLeftPos=String(Math.floor(this.mouseLeft-this.zoomLens.width()/2)),this.lensTopPos=String(Math.floor(this.mouseTop-this.zoomLens.height()/2))),this.Etoppos&&(this.lensTopPos=0),this.Eloppos&&(this.windowLeftPos=0,this.lensLeftPos=0,this.tintpos=0),"window"===this.options.zoomType&&(this.Eboppos&&(this.lensTopPos=Math.max(this.nzHeight-this.zoomLens.height()-2*this.options.lensBorderSize,0)),this.Eroppos&&(this.lensLeftPos=this.nzWidth-this.zoomLens.width()-2*this.options.lensBorderSize)),"inner"===this.options.zoomType&&(this.Eboppos&&(this.lensTopPos=Math.max(this.nzHeight-2*this.options.lensBorderSize,0)),this.Eroppos&&(this.lensLeftPos=this.nzWidth-this.nzWidth-2*this.options.lensBorderSize)),"lens"===this.options.zoomType&&(this.windowLeftPos=String(-1*((o.pageX-this.nzOffset.left)*this.widthRatio-this.zoomLens.width()/2)),this.windowTopPos=String(-1*((o.pageY-this.nzOffset.top)*this.heightRatio-this.zoomLens.height()/2)),this.zoomLens.css("background-position",this.windowLeftPos+"px "+this.windowTopPos+"px"),this.changeBgSize&&(this.nzHeight>this.nzWidth?("lens"===this.options.zoomType&&this.zoomLens.css("background-size",this.largeWidth/this.newvalueheight+"px "+this.largeHeight/this.newvalueheight+"px"),this.zoomWindow.css("background-size",this.largeWidth/this.newvalueheight+"px "+this.largeHeight/this.newvalueheight+"px")):("lens"===this.options.zoomType&&this.zoomLens.css("background-size",this.largeWidth/this.newvaluewidth+"px "+this.largeHeight/this.newvaluewidth+"px"),this.zoomWindow.css("background-size",this.largeWidth/this.newvaluewidth+"px "+this.largeHeight/this.newvaluewidth+"px")),this.changeBgSize=!1),this.setWindowPosition(o)),this.options.tint&&"inner"!==this.options.zoomType&&this.setTintPosition(o),"window"===this.options.zoomType&&this.setWindowPosition(o),"inner"===this.options.zoomType&&this.setWindowPosition(o),this.options.showLens&&(this.fullwidth&&"lens"!==this.options.zoomType&&(this.lensLeftPos=0),this.zoomLens.css({left:this.lensLeftPos+"px",top:this.lensTopPos+"px"})))},showHideZoomContainer:function(o){"show"===o&&this.zoomContainer&&this.zoomContainer.show(),"hide"===o&&this.zoomContainer&&this.zoomContainer.hide()},showHideWindow:function(o){var i=this;"show"===o&&!i.isWindowActive&&i.zoomWindow&&(i.options.onShow(i),i.options.zoomWindowFadeIn?i.zoomWindow.stop(!0,!0,!1).fadeIn(i.options.zoomWindowFadeIn):i.zoomWindow.show(),i.isWindowActive=!0),"hide"===o&&i.isWindowActive&&(i.options.zoomWindowFadeOut?i.zoomWindow.stop(!0,!0).fadeOut(i.options.zoomWindowFadeOut,function(){i.loop&&(clearInterval(i.loop),i.loop=!1)}):i.zoomWindow.hide(),i.isWindowActive=!1)},showHideLens:function(o){"show"===o&&(this.isLensActive||(this.options.lensFadeIn&&this.zoomLens?this.zoomLens.stop(!0,!0,!1).fadeIn(this.options.lensFadeIn):this.zoomLens.show(),this.isLensActive=!0)),"hide"===o&&this.isLensActive&&(this.options.lensFadeOut?this.zoomLens.stop(!0,!0).fadeOut(this.options.lensFadeOut):this.zoomLens.hide(),this.isLensActive=!1)},showHideTint:function(o){"show"===o&&!this.isTintActive&&this.zoomTint&&(this.options.zoomTintFadeIn?this.zoomTint.css("opacity",this.options.tintOpacity).animate().stop(!0,!0).fadeIn("slow"):(this.zoomTint.css("opacity",this.options.tintOpacity).animate(),this.zoomTint.show()),this.isTintActive=!0),"hide"===o&&this.isTintActive&&(this.options.zoomTintFadeOut?this.zoomTint.stop(!0,!0).fadeOut(this.options.zoomTintFadeOut):this.zoomTint.hide(),this.isTintActive=!1)},setLensPosition:function(o){},setWindowPosition:function(i){var t=this;if(isNaN(t.options.zoomWindowPosition))t.externalContainer=o("#"+t.options.zoomWindowPosition),t.externalContainerWidth=t.externalContainer.width(),t.externalContainerHeight=t.externalContainer.height(),t.externalContainerOffset=t.externalContainer.offset(),t.windowOffsetTop=t.externalContainerOffset.top,t.windowOffsetLeft=t.externalContainerOffset.left;else switch(t.options.zoomWindowPosition){case 1:t.windowOffsetTop=t.options.zoomWindowOffsetY,t.windowOffsetLeft=+t.nzWidth;break;case 2:t.options.zoomWindowHeight>t.nzHeight?(t.windowOffsetTop=-1*(t.options.zoomWindowHeight/2-t.nzHeight/2),t.windowOffsetLeft=t.nzWidth):o.noop();break;case 3:t.windowOffsetTop=t.nzHeight-t.zoomWindow.height()-2*t.options.borderSize,t.windowOffsetLeft=t.nzWidth;break;case 4:t.windowOffsetTop=t.nzHeight,t.windowOffsetLeft=t.nzWidth;break;case 5:t.windowOffsetTop=t.nzHeight,t.windowOffsetLeft=t.nzWidth-t.zoomWindow.width()-2*t.options.borderSize;break;case 6:t.options.zoomWindowHeight>t.nzHeight?(t.windowOffsetTop=t.nzHeight,t.windowOffsetLeft=-1*(t.options.zoomWindowWidth/2-t.nzWidth/2+2*t.options.borderSize)):o.noop();break;case 7:t.windowOffsetTop=t.nzHeight,t.windowOffsetLeft=0;break;case 8:t.windowOffsetTop=t.nzHeight,t.windowOffsetLeft=-1*(t.zoomWindow.width()+2*t.options.borderSize);break;case 9:t.windowOffsetTop=t.nzHeight-t.zoomWindow.height()-2*t.options.borderSize,t.windowOffsetLeft=-1*(t.zoomWindow.width()+2*t.options.borderSize);break;case 10:t.options.zoomWindowHeight>t.nzHeight?(t.windowOffsetTop=-1*(t.options.zoomWindowHeight/2-t.nzHeight/2),t.windowOffsetLeft=-1*(t.zoomWindow.width()+2*t.options.borderSize)):o.noop();break;case 11:t.windowOffsetTop=t.options.zoomWindowOffsetY,t.windowOffsetLeft=-1*(t.zoomWindow.width()+2*t.options.borderSize);break;case 12:t.windowOffsetTop=-1*(t.zoomWindow.height()+2*t.options.borderSize),t.windowOffsetLeft=-1*(t.zoomWindow.width()+2*t.options.borderSize);break;case 13:t.windowOffsetTop=-1*(t.zoomWindow.height()+2*t.options.borderSize),t.windowOffsetLeft=0;break;case 14:t.options.zoomWindowHeight>t.nzHeight?(t.windowOffsetTop=-1*(t.zoomWindow.height()+2*t.options.borderSize),t.windowOffsetLeft=-1*(t.options.zoomWindowWidth/2-t.nzWidth/2+2*t.options.borderSize)):o.noop();break;case 15:t.windowOffsetTop=-1*(t.zoomWindow.height()+2*t.options.borderSize),t.windowOffsetLeft=t.nzWidth-t.zoomWindow.width()-2*t.options.borderSize;break;case 16:t.windowOffsetTop=-1*(t.zoomWindow.height()+2*t.options.borderSize),t.windowOffsetLeft=t.nzWidth;break;default:t.windowOffsetTop=t.options.zoomWindowOffsetY,t.windowOffsetLeft=t.nzWidth}t.isWindowSet=!0,t.windowOffsetTop=t.windowOffsetTop+t.options.zoomWindowOffsetY,t.windowOffsetLeft=t.windowOffsetLeft+t.options.zoomWindowOffsetX,t.zoomWindow.css({top:t.windowOffsetTop,left:t.windowOffsetLeft}),"inner"===t.options.zoomType&&t.zoomWindow.css({top:0,left:0}),t.windowLeftPos=String(-1*((i.pageX-t.nzOffset.left)*t.widthRatio-t.zoomWindow.width()/2)),t.windowTopPos=String(-1*((i.pageY-t.nzOffset.top)*t.heightRatio-t.zoomWindow.height()/2)),t.Etoppos&&(t.windowTopPos=0),t.Eloppos&&(t.windowLeftPos=0),t.Eboppos&&(t.windowTopPos=-1*(t.largeHeight/t.currentZoomLevel-t.zoomWindow.height())),t.Eroppos&&(t.windowLeftPos=-1*(t.largeWidth/t.currentZoomLevel-t.zoomWindow.width())),t.fullheight&&(t.windowTopPos=0),t.fullwidth&&(t.windowLeftPos=0),"window"!==t.options.zoomType&&"inner"!==t.options.zoomType||(1===t.zoomLock&&(t.widthRatio<=1&&(t.windowLeftPos=0),t.heightRatio<=1&&(t.windowTopPos=0)),"window"===t.options.zoomType&&(t.largeHeightt.nzWidth?("lens"===t.options.zoomType&&t.zoomLens.css("background-size",t.largeWidth/t.newvalueheight+"px "+t.largeHeight/t.newvalueheight+"px"),t.zoomWindow.css("background-size",t.largeWidth/t.newvalueheight+"px "+t.largeHeight/t.newvalueheight+"px")):("lens"!==t.options.zoomType&&t.zoomLens.css("background-size",t.largeWidth/t.newvaluewidth+"px "+t.largeHeight/t.newvalueheight+"px"),t.zoomWindow.css("background-size",t.largeWidth/t.newvaluewidth+"px "+t.largeHeight/t.newvaluewidth+"px")),t.changeBgSize=!1),t.zoomWindow.css("background-position",t.windowLeftPos+"px "+t.windowTopPos+"px"),t.scrollingLock=!1,t.loop=!1):Math.round(Math.abs(t.xp-t.windowLeftPos)+Math.abs(t.yp-t.windowTopPos))<1?(clearInterval(t.loop),t.zoomWindow.css("background-position",t.windowLeftPos+"px "+t.windowTopPos+"px"),t.loop=!1):(t.changeBgSize&&(t.nzHeight>t.nzWidth?("lens"===t.options.zoomType&&t.zoomLens.css("background-size",t.largeWidth/t.newvalueheight+"px "+t.largeHeight/t.newvalueheight+"px"),t.zoomWindow.css("background-size",t.largeWidth/t.newvalueheight+"px "+t.largeHeight/t.newvalueheight+"px")):("lens"!==t.options.zoomType&&t.zoomLens.css("background-size",t.largeWidth/t.newvaluewidth+"px "+t.largeHeight/t.newvaluewidth+"px"),t.zoomWindow.css("background-size",t.largeWidth/t.newvaluewidth+"px "+t.largeHeight/t.newvaluewidth+"px")),t.changeBgSize=!1),t.zoomWindow.css("background-position",t.xp+"px "+t.yp+"px"))},16))):(t.changeBgSize&&(t.nzHeight>t.nzWidth?("lens"===t.options.zoomType&&t.zoomLens.css("background-size",t.largeWidth/t.newvalueheight+"px "+t.largeHeight/t.newvalueheight+"px"),t.zoomWindow.css("background-size",t.largeWidth/t.newvalueheight+"px "+t.largeHeight/t.newvalueheight+"px")):("lens"===t.options.zoomType&&t.zoomLens.css("background-size",t.largeWidth/t.newvaluewidth+"px "+t.largeHeight/t.newvaluewidth+"px"),t.largeHeight/t.newvaluewidth
'),e.$elem.after(e.spinner)),e.options.onImageSwap(e.$elem),n.onload=function(){e.largeWidth=n.width,e.largeHeight=n.height,e.zoomImage=t,e.zoomWindow.css("background-size",e.largeWidth+"px "+e.largeHeight+"px"),e.swapAction(i,t)},e.setImageSource(n,t)},swapAction:function(i,t){var e=this,n=e.$elem.width(),s=e.$elem.height(),h=new Image;if(h.onload=function(){e.nzHeight=h.height,e.nzWidth=h.width,e.options.onImageSwapComplete(e.$elem),e.doneCallback()},e.setImageSource(h,i),e.currentZoomLevel=e.options.zoomLevel,e.options.maxZoomLevel=!1,"lens"===e.options.zoomType&&e.zoomLens.css("background-image",'url("'+t+'")'),"window"===e.options.zoomType&&e.zoomWindow.css("background-image",'url("'+t+'")'),"inner"===e.options.zoomType&&e.zoomWindow.css("background-image",'url("'+t+'")'),e.currentImage=t,e.options.imageCrossfade){var d=e.$elem,a=d.clone();if(e.$elem.attr("src",i),e.$elem.after(a),a.stop(!0).fadeOut(e.options.imageCrossfade,function(){o(this).remove()}),e.$elem.width("auto").removeAttr("width"),e.$elem.height("auto").removeAttr("height"),d.fadeIn(e.options.imageCrossfade),e.options.tint&&"inner"!==e.options.zoomType){var p=e.zoomTintImage,r=p.clone();e.zoomTintImage.attr("src",t),e.zoomTintImage.after(r),r.stop(!0).fadeOut(e.options.imageCrossfade,function(){o(this).remove()}),p.fadeIn(e.options.imageCrossfade),e.zoomTint.css({height:s,width:n})}e.zoomContainer.css({height:s,width:n}),"inner"===e.options.zoomType&&(e.options.constrainType||(e.zoomWrap.parent().css({height:s,width:n}),e.zoomWindow.css({height:s,width:n}))),e.options.imageCrossfade&&e.zoomWrap.css({height:s,width:n})}else e.$elem.attr("src",i),e.options.tint&&(e.zoomTintImage.attr("src",t),e.zoomTintImage.attr("height",s),e.zoomTintImage.css("height",s),e.zoomTint.css("height",s)),e.zoomContainer.css({height:s,width:n}),e.options.imageCrossfade&&e.zoomWrap.css({height:s,width:n});if(e.options.constrainType){if("height"===e.options.constrainType){var l={height:e.options.constrainSize,width:"auto"};e.zoomContainer.css(l),e.options.imageCrossfade?(e.zoomWrap.css(l),e.constwidth=e.zoomWrap.width()):(e.$elem.css(l),e.constwidth=n);var m={height:e.options.constrainSize,width:e.constwidth};"inner"===e.options.zoomType&&(e.zoomWrap.parent().css(m),e.zoomWindow.css(m)),e.options.tint&&(e.tintContainer.css(m),e.zoomTint.css(m),e.zoomTintImage.css(m))}if("width"===e.options.constrainType){var w={height:"auto",width:e.options.constrainSize};e.zoomContainer.css(w),e.options.imageCrossfade?(e.zoomWrap.css(w),e.constheight=e.zoomWrap.height()):(e.$elem.css(w),e.constheight=s);var g={height:e.constheight,width:e.options.constrainSize};"inner"===e.options.zoomType&&(e.zoomWrap.parent().css(g),e.zoomWindow.css(g)),e.options.tint&&(e.tintContainer.css(g),e.zoomTint.css(g),e.zoomTintImage.css(g))}}},doneCallback:function(){var o,i;(this.options.loadingIcon&&this.spinner.hide(),this.nzOffset=this.$elem.offset(),this.nzWidth=this.$elem.width(),this.nzHeight=this.$elem.height(),this.currentZoomLevel=this.options.zoomLevel,this.widthRatio=this.largeWidth/this.nzWidth,this.heightRatio=this.largeHeight/this.nzHeight,"window"===this.options.zoomType)&&(o=this.nzHeight(t=parseFloat(this.largeHeight/this.nzHeight).toFixed(2))&&(i=t),i>(e=parseFloat(this.largeWidth/this.nzWidth).toFixed(2))&&(i=e),t<=i?(this.heightRatio=this.largeHeight/i/this.nzHeight,this.newvalueheight=i>t?t:i,this.fullheight=!0):(this.heightRatio=this.largeHeight/i/this.nzHeight,this.newvalueheight=i>t?t:i,this.fullheight=!1),e<=i?(this.widthRatio=this.largeWidth/i/this.nzWidth,this.newvaluewidth=i>e?e:i,this.fullwidth=!0):(this.widthRatio=this.largeWidth/i/this.nzWidth,this.newvaluewidth=i,this.fullwidth=!1));var n=!1;"inner"===this.options.zoomType&&(this.nzWidth>=this.nzHeight&&(this.newvaluewidth<=e?n=!0:(n=!1,this.fullheight=!0,this.fullwidth=!0)),this.nzHeight>this.nzWidth&&(this.newvaluewidth<=e?n=!0:(n=!1,this.fullheight=!0,this.fullwidth=!0))),"inner"!==this.options.zoomType&&(n=!0),n&&(this.zoomLock=0,this.changeZoom=!0,this.options.zoomWindowHeight/this.heightRatio<=this.nzHeight&&(this.currentZoomLevel=this.newvalueheight,"lens"!==this.options.zoomType&&"inner"!==this.options.zoomType&&(this.changeBgSize=!0,this.zoomLens.css("height",String(this.options.zoomWindowHeight/this.heightRatio)+"px")),"lens"!==this.options.zoomType&&"inner"!==this.options.zoomType||(this.changeBgSize=!0)),this.options.zoomWindowWidth/this.widthRatio<=this.nzWidth&&("inner"!==this.options.zoomType&&this.newvaluewidth>this.newvalueheight&&(this.currentZoomLevel=this.newvaluewidth),"lens"!==this.options.zoomType&&"inner"!==this.options.zoomType&&(this.changeBgSize=!0,this.zoomLens.css("width",String(this.options.zoomWindowWidth/this.widthRatio)+"px")),"lens"!==this.options.zoomType&&"inner"!==this.options.zoomType||(this.changeBgSize=!0)),"inner"===this.options.zoomType&&(this.changeBgSize=!0,this.nzWidth>this.nzHeight&&(this.currentZoomLevel=this.newvaluewidth),this.nzHeight>this.nzWidth&&(this.currentZoomLevel=this.newvaluewidth))),this.setPosition(this.currentLoc)},closeAll:function(){this.zoomWindow&&this.zoomWindow.hide(),this.zoomLens&&this.zoomLens.hide(),this.zoomTint&&this.zoomTint.hide()},changeState:function(o){"enable"===o&&(this.options.zoomEnabled=!0),"disable"===o&&(this.options.zoomEnabled=!1)},responsiveConfig:function(i){return i.respond&&i.respond.length>0?o.extend({},i,this.configByScreenWidth(i)):i},configByScreenWidth:function(t){var e=o(i).width(),n=o.grep(t.respond,function(o){var i=o.range.split("-");return e>=i[0]&&e<=i[1]});return n.length>0?n[0]:t}};o.fn.ezPlus=function(i){return this.each(function(){var t=Object.create(n);t.init(i,this),o.data(this,"ezPlus",t)})},o.fn.ezPlus.options={borderColour:"#888",borderSize:4,constrainSize:!1,constrainType:!1,containLensZoom:!1,cursor:"inherit",debug:!1,easing:!1,easingAmount:12,enabled:!0,gallery:!1,galleryActiveClass:"zoomGalleryActive",gallerySelector:!1,galleryItem:"a",imageCrossfade:!1,lensBorderColour:"#000",lensBorderSize:1,lensColour:"white",lensFadeIn:!1,lensFadeOut:!1,lensOpacity:.4,lensShape:"square",lensSize:200,lenszoom:!1,loadingIcon:!1,mantainZoomAspectRatio:!1,maxZoomLevel:!1,minZoomLevel:!1,onComplete:o.noop,onDestroy:o.noop,onImageClick:o.noop,onImageSwap:o.noop,onImageSwapComplete:o.noop,onShow:o.noop,onZoomedImageLoaded:o.noop,preloading:1,respond:[],responsive:!0,scrollZoom:!1,scrollZoomIncrement:.1,showLens:!0,tint:!1,tintColour:"#333",tintOpacity:.4,touchEnabled:!0,zoomActivation:"hover",zoomContainerAppendTo:"body",zoomLevel:1,zoomTintFadeIn:!1,zoomTintFadeOut:!1,zoomType:"window",zoomWindowAlwaysShow:!1,zoomWindowBgColour:"#fff",zoomWindowFadeIn:!1,zoomWindowFadeOut:!1,zoomWindowHeight:400,zoomWindowOffsetX:0,zoomWindowOffsetY:0,zoomWindowPosition:1,zoomWindowWidth:400,zoomEnabled:!0,zIndex:999}}(jQuery,window,document); \ No newline at end of file From d2ff59cc15258fa6d22dcd43d25defb30534d0b0 Mon Sep 17 00:00:00 2001 From: Pranshu Tomar Date: Mon, 8 Jun 2020 16:10:53 +0530 Subject: [PATCH 12/61] Issue #3160 fixed --- packages/Webkul/Admin/webpack.mix.js | 2 +- .../Product/src/Helpers/BundleOption.php | 30 ++++++++++++------- packages/Webkul/Product/src/Type/Bundle.php | 20 +++++++++++++ 3 files changed, 41 insertions(+), 11 deletions(-) diff --git a/packages/Webkul/Admin/webpack.mix.js b/packages/Webkul/Admin/webpack.mix.js index 10ebcb348..30c3baaf5 100755 --- a/packages/Webkul/Admin/webpack.mix.js +++ b/packages/Webkul/Admin/webpack.mix.js @@ -21,7 +21,7 @@ mix.js(__dirname + "/src/Resources/assets/js/app.js", "js/admin.js") processCssUrls: false }); -if (!mix.inProduction()) { +if (! mix.inProduction()) { mix.sourceMaps(); } diff --git a/packages/Webkul/Product/src/Helpers/BundleOption.php b/packages/Webkul/Product/src/Helpers/BundleOption.php index fcfca3148..406a12d63 100644 --- a/packages/Webkul/Product/src/Helpers/BundleOption.php +++ b/packages/Webkul/Product/src/Helpers/BundleOption.php @@ -36,7 +36,13 @@ class BundleOption extends AbstractProduct $options = []; foreach ($this->product->bundle_options as $option) { - $options[$option->id] = $this->getOptionItemData($option); + $data = $this->getOptionItemData($option); + + if (! count($data['products'])) { + continue; + } + + $options[$option->id] = $data; } usort ($options, function($a, $b) { @@ -79,6 +85,10 @@ class BundleOption extends AbstractProduct $products = []; foreach ($option->bundle_option_products as $index => $bundleOptionProduct) { + if (! $bundleOptionProduct->product->getTypeInstance()->isSaleable()) { + continue; + } + $products[$bundleOptionProduct->id] = [ 'id' => $bundleOptionProduct->id, 'qty' => $bundleOptionProduct->qty, @@ -110,15 +120,15 @@ class BundleOption extends AbstractProduct { $products = []; - $products[$product->id] = [ - 'id' => $product->id, - 'qty' => $product->qty, - 'price' => $product->product->getTypeInstance()->getProductPrices(), - 'name' => $product->product->name, - 'product_id' => $product->product_id, - 'is_default' => $product->is_default, - 'sort_order' => $product->sort_order, - ]; + $products[$product->id] = [ + 'id' => $product->id, + 'qty' => $product->qty, + 'price' => $product->product->getTypeInstance()->getProductPrices(), + 'name' => $product->product->name, + 'product_id' => $product->product_id, + 'is_default' => $product->is_default, + 'sort_order' => $product->sort_order, + ]; usort ($products, function($a, $b) { if ($a['sort_order'] == $b['sort_order']) { diff --git a/packages/Webkul/Product/src/Type/Bundle.php b/packages/Webkul/Product/src/Type/Bundle.php index dfb959304..3850e24c5 100644 --- a/packages/Webkul/Product/src/Type/Bundle.php +++ b/packages/Webkul/Product/src/Type/Bundle.php @@ -234,6 +234,10 @@ class Bundle extends AbstractType $optionPrices = []; foreach ($option->bundle_option_products as $index => $bundleOptionProduct) { + if (! $bundleOptionProduct->product->getTypeInstance()->isSaleable()) { + continue; + } + $optionPrices[] = $bundleOptionProduct->qty * ($minPrice ? $bundleOptionProduct->product->getTypeInstance()->getMinimalPrice() @@ -271,6 +275,10 @@ class Bundle extends AbstractType foreach ($this->product->bundle_options as $option) { foreach ($option->bundle_option_products as $index => $bundleOptionProduct) { + if (! $bundleOptionProduct->product->getTypeInstance()->isSaleable()) { + continue; + } + if (in_array($option->type, ['multiselect', 'checkbox'])) { if (! isset($optionPrices[$option->id][0])) { $optionPrices[$option->id][0] = 0; @@ -304,6 +312,10 @@ class Bundle extends AbstractType foreach ($this->product->bundle_options as $option) { foreach ($option->bundle_option_products as $index => $bundleOptionProduct) { + if (! $bundleOptionProduct->product->getTypeInstance()->isSaleable()) { + continue; + } + if (in_array($option->type, ['multiselect', 'checkbox'])) { if (! isset($optionPrices[$option->id][0])) { $optionPrices[$option->id][0] = 0; @@ -427,6 +439,10 @@ class Bundle extends AbstractType foreach ($this->getCartChildProducts($data) as $productId => $data) { $product = $this->productRepository->find($productId); + if (! $product->getTypeInstance()->isSaleable()) { + continue; + } + $cartProduct = $product->getTypeInstance()->prepareForCart(array_merge($data, ['parent_id' => $this->product->id])); if (is_string($cartProduct)) { @@ -473,6 +489,10 @@ class Bundle extends AbstractType 'product_bundle_option_id' => $optionId, ]); + if (! $optionProduct->product->getTypeInstance()->isSaleable()) { + continue; + } + $qty = $data['bundle_option_qty'][$optionId] ?? $optionProduct->qty; if (! isset($products[$optionProduct->product_id])) { From 5c2db445b8063a2922d92e2c608bf48f3e538c99 Mon Sep 17 00:00:00 2001 From: Herbert Maschke Date: Mon, 8 Jun 2020 13:00:53 +0200 Subject: [PATCH 13/61] Remove redundant filter in cart rule index page --- .../promotions/cart-rules/index.blade.php | 34 ------------------- 1 file changed, 34 deletions(-) diff --git a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rules/index.blade.php b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rules/index.blade.php index 3cfaafdd7..556a605bf 100644 --- a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rules/index.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rules/index.blade.php @@ -11,40 +11,6 @@ @@ -26,16 +26,6 @@ -@endpush \ No newline at end of file + +@endpush From ed59f3ae9dad27d925bd28b296e5d157b58da818 Mon Sep 17 00:00:00 2001 From: Shubham Mehrotra Date: Mon, 8 Jun 2020 21:37:59 +0530 Subject: [PATCH 15/61] #3172 --- .../Velocity/src/Http/Controllers/Shop/ComparisonController.php | 1 + .../views/shop/guest/compare/compare-products.blade.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/Webkul/Velocity/src/Http/Controllers/Shop/ComparisonController.php b/packages/Webkul/Velocity/src/Http/Controllers/Shop/ComparisonController.php index f95fcb5cd..52260f1c5 100644 --- a/packages/Webkul/Velocity/src/Http/Controllers/Shop/ComparisonController.php +++ b/packages/Webkul/Velocity/src/Http/Controllers/Shop/ComparisonController.php @@ -81,6 +81,7 @@ class ComparisonController extends Controller $productFlat = $productFlatRepository ->where('product_id', $productId) + ->orWhere('parent_id', $productId) ->get() ->first(); diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/guest/compare/compare-products.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/guest/compare/compare-products.blade.php index 072abcc03..0409933f9 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/guest/compare/compare-products.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/guest/compare/compare-products.blade.php @@ -124,7 +124,7 @@ @endforeach - + @{{ __('customer.compare.empty-text') }} From 449a2e1d4744ba1b13bdf67427db49303aaadddd Mon Sep 17 00:00:00 2001 From: Annika Wolff Date: Tue, 9 Jun 2020 08:15:17 +0200 Subject: [PATCH 16/61] add logging to exception thrown in cart --- packages/Webkul/Checkout/src/Cart.php | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/packages/Webkul/Checkout/src/Cart.php b/packages/Webkul/Checkout/src/Cart.php index 635764533..21059ae07 100755 --- a/packages/Webkul/Checkout/src/Cart.php +++ b/packages/Webkul/Checkout/src/Cart.php @@ -2,6 +2,8 @@ namespace Webkul\Checkout; +use Exception; +use Illuminate\Support\Facades\Log; use Webkul\Checkout\Models\Cart as CartModel; use Webkul\Checkout\Models\CartAddress; use Webkul\Checkout\Repositories\CartRepository; @@ -122,9 +124,11 @@ class Cart /** * Add Items in a cart with some cart and item details. * - * @param int $productId - * @param array $data - * @return \Webkul\Checkout\Contracts\Cart|\Exception|array + * @param int $productId + * @param array $data + * + * @return \Webkul\Checkout\Contracts\Cart|string|array + * @throws Exception */ public function addProduct($productId, $data) { @@ -147,7 +151,8 @@ class Cart session()->forget('cart'); } - throw new \Exception($cartProducts); + Log::error($cartProducts, ['product' => $product, 'cartData' => $data]); + throw new Exception($cartProducts); } else { $parentCartItem = null; @@ -161,7 +166,7 @@ class Cart if (! $cartItem) { $cartItem = $this->cartItemRepository->create(array_merge($cartProduct, ['cart_id' => $cart->id])); } else { - if (isset($cartProduct['parent_id']) && $cartItem->parent_id != $parentCartItem->id) { + if (isset($cartProduct['parent_id']) && $cartItem->parent_id !== $parentCartItem->id) { $cartItem = $this->cartItemRepository->create(array_merge($cartProduct, [ 'cart_id' => $cart->id ])); @@ -232,7 +237,8 @@ class Cart * Update cart items information * * @param array $data - * @return bool|void|\Exception + * + * @return bool|void|Exception */ public function updateItems($data) { @@ -246,13 +252,13 @@ class Cart if ($quantity <= 0) { $this->removeItem($itemId); - throw new \Exception(trans('shop::app.checkout.cart.quantity.illegal')); + throw new Exception(trans('shop::app.checkout.cart.quantity.illegal')); } $item->quantity = $quantity; if (! $this->isItemHaveQuantity($item)) { - throw new \Exception(trans('shop::app.checkout.cart.quantity.inventory_warning')); + throw new Exception(trans('shop::app.checkout.cart.quantity.inventory_warning')); } Event::dispatch('checkout.cart.update.before', $item); @@ -499,7 +505,7 @@ class Cart $this->saveAddressesWhenRequested($data, $billingAddressData, $shippingAddressData); $this->linkAddresses($cart, $billingAddressData, $shippingAddressData); - + $this->assignCustomerFields($cart); $cart->save(); From a32925f6ce8934313dc45770847af4298df9571b Mon Sep 17 00:00:00 2001 From: Annika Wolff Date: Tue, 9 Jun 2020 08:35:22 +0200 Subject: [PATCH 17/61] refactor used translation function --- packages/Webkul/Checkout/src/Cart.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/Webkul/Checkout/src/Cart.php b/packages/Webkul/Checkout/src/Cart.php index 21059ae07..289585412 100755 --- a/packages/Webkul/Checkout/src/Cart.php +++ b/packages/Webkul/Checkout/src/Cart.php @@ -223,7 +223,7 @@ class Cart $cart = $this->cartRepository->create($cartData); if (! $cart) { - session()->flash('error', trans('shop::app.checkout.cart.create-error')); + session()->flash('error', __('shop::app.checkout.cart.create-error')); return; } @@ -252,13 +252,13 @@ class Cart if ($quantity <= 0) { $this->removeItem($itemId); - throw new Exception(trans('shop::app.checkout.cart.quantity.illegal')); + throw new Exception(__('shop::app.checkout.cart.quantity.illegal')); } $item->quantity = $quantity; if (! $this->isItemHaveQuantity($item)) { - throw new Exception(trans('shop::app.checkout.cart.quantity.inventory_warning')); + throw new Exception(__('shop::app.checkout.cart.quantity.inventory_warning')); } Event::dispatch('checkout.cart.update.before', $item); From 5b398574aec26d596aa5f5a1d70908ddfaaea70e Mon Sep 17 00:00:00 2001 From: Pranshu Tomar Date: Tue, 9 Jun 2020 12:54:46 +0530 Subject: [PATCH 18/61] Migrate to laravel 7 --- .gitignore | 2 - app/Exceptions/Handler.php | 10 +- composer.json | 25 +- composer.lock | 2202 +++++++++++------ config/session.php | 2 +- .../Factories/AttributeOptionFactory.php | 8 +- .../Webkul/Core/src/Exceptions/Handler.php | 6 +- 7 files changed, 1533 insertions(+), 722 deletions(-) diff --git a/.gitignore b/.gitignore index 6dc14fade..9248d96a3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ /docker-compose-collection -/bin /node_modules /public/hot /public/storage @@ -22,7 +21,6 @@ yarn.lock package-lock.json yarn.lock .php_cs.cache -storage/ storage/*.key /docker-compose-collection/ /resources/themes/velocity/* \ No newline at end of file diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 043cad6bc..cbd773fef 100755 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -2,7 +2,7 @@ namespace App\Exceptions; -use Exception; +use Throwable; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; class Handler extends ExceptionHandler @@ -29,10 +29,10 @@ class Handler extends ExceptionHandler /** * Report or log an exception. * - * @param \Exception $exception + * @param \Throwable $exception * @return void */ - public function report(Exception $exception) + public function report(Throwable $exception) { parent::report($exception); } @@ -41,10 +41,10 @@ class Handler extends ExceptionHandler * Render an exception into an HTTP response. * * @param \Illuminate\Http\Request $request - * @param \Exception $exception + * @param \Throwable $exception * @return \Illuminate\Http\Response */ - public function render($request, Exception $exception) + public function render($request, Throwable $exception) { return parent::render($request, $exception); } diff --git a/composer.json b/composer.json index 4a8cd169a..dceaa40c2 100755 --- a/composer.json +++ b/composer.json @@ -9,7 +9,7 @@ "license": "MIT", "type": "project", "require": { - "php": "^7.2.0", + "php": "^7.2.5", "ext-curl": "*", "ext-intl": "*", "ext-mbstring": "*", @@ -18,23 +18,22 @@ "ext-pdo_mysql": "*", "ext-tokenizer": "*", "astrotomic/laravel-translatable": "^11.0.0", - "barryvdh/laravel-dompdf": "0.8.5", + "barryvdh/laravel-dompdf": "0.8.6", "doctrine/dbal": "2.9.2", - "fideloper/proxy": "^4.0", + "fideloper/proxy": "^4.2", "flynsarmy/db-blade-compiler": "^5.5", - "guzzlehttp/guzzle": "~6.0", + "guzzlehttp/guzzle": "~6.3", "intervention/image": "^2.4", "intervention/imagecache": "^2.3", - "kalnoy/nestedset": "5.0.0", + "kalnoy/nestedset": "5.0.1", "konekt/concord": "^1.2", - "laravel/framework": "^6.0", - "laravel/helpers": "^1.1", - "laravel/tinker": "^1.0", - "maatwebsite/excel": "3.1.18", + "laravel/framework": "^7.0", + "laravel/tinker": "^2.0", + "maatwebsite/excel": "3.1.19", "prettus/l5-repository": "^2.6", "tymon/jwt-auth": "^1.0.0", "barryvdh/laravel-debugbar": "^3.1", - "fzaninotto/faker": "^1.4" + "fzaninotto/faker": "^1.9.1" }, "require-dev": { @@ -46,9 +45,9 @@ "codeception/module-webdriver": "^1.0", "filp/whoops": "^2.0", "fzaninotto/faker": "^1.4", - "mockery/mockery": "^1.0", - "nunomaduro/collision": "^2.0", - "phpunit/phpunit": "^7.0" + "mockery/mockery": "^1.3.1", + "nunomaduro/collision": "^4.1", + "phpunit/phpunit": "^8.5" }, "replace": { diff --git a/composer.lock b/composer.lock index 3846dfd67..44b6290d8 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": "0ba9dbd80803ce19df6735d4a92a17c6", + "content-hash": "f30430f65c1f5650515c1af10a9c5d9d", "packages": [ { "name": "astrotomic/laravel-translatable", @@ -165,21 +165,21 @@ }, { "name": "barryvdh/laravel-dompdf", - "version": "v0.8.5", + "version": "v0.8.6", "source": { "type": "git", "url": "https://github.com/barryvdh/laravel-dompdf.git", - "reference": "7393732b2f3a3ee357974cbb0c46c9b65b84dad1" + "reference": "d7108f78cf5254a2d8c224542967f133e5a6d4e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-dompdf/zipball/7393732b2f3a3ee357974cbb0c46c9b65b84dad1", - "reference": "7393732b2f3a3ee357974cbb0c46c9b65b84dad1", + "url": "https://api.github.com/repos/barryvdh/laravel-dompdf/zipball/d7108f78cf5254a2d8c224542967f133e5a6d4e8", + "reference": "d7108f78cf5254a2d8c224542967f133e5a6d4e8", "shasum": "" }, "require": { "dompdf/dompdf": "^0.8", - "illuminate/support": "^5.5|^6", + "illuminate/support": "^5.5|^6|^7", "php": ">=7" }, "type": "library", @@ -217,7 +217,59 @@ "laravel", "pdf" ], - "time": "2019-08-23T14:30:33+00:00" + "time": "2020-02-25T20:44:34+00:00" + }, + { + "name": "brick/math", + "version": "0.8.15", + "source": { + "type": "git", + "url": "https://github.com/brick/math.git", + "reference": "9b08d412b9da9455b210459ff71414de7e6241cd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/brick/math/zipball/9b08d412b9da9455b210459ff71414de7e6241cd", + "reference": "9b08d412b9da9455b210459ff71414de7e6241cd", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": "^7.1|^8.0" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.2", + "phpunit/phpunit": "^7.5.15|^8.5", + "vimeo/psalm": "^3.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Brick\\Math\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Arbitrary-precision arithmetic library", + "keywords": [ + "Arbitrary-precision", + "BigInteger", + "BigRational", + "arithmetic", + "bigdecimal", + "bignum", + "brick", + "math" + ], + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/brick/math", + "type": "tidelift" + } + ], + "time": "2020-04-15T15:59:35+00:00" }, { "name": "dnoegel/php-xdg-base-dir", @@ -254,20 +306,20 @@ }, { "name": "doctrine/cache", - "version": "1.10.0", + "version": "1.10.1", "source": { "type": "git", "url": "https://github.com/doctrine/cache.git", - "reference": "382e7f4db9a12dc6c19431743a2b096041bcdd62" + "reference": "35a4a70cd94e09e2259dfae7488afc6b474ecbd3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/382e7f4db9a12dc6c19431743a2b096041bcdd62", - "reference": "382e7f4db9a12dc6c19431743a2b096041bcdd62", + "url": "https://api.github.com/repos/doctrine/cache/zipball/35a4a70cd94e09e2259dfae7488afc6b474ecbd3", + "reference": "35a4a70cd94e09e2259dfae7488afc6b474ecbd3", "shasum": "" }, "require": { - "php": "~7.1" + "php": "~7.1 || ^8.0" }, "conflict": { "doctrine/common": ">2.2,<2.4" @@ -332,7 +384,21 @@ "redis", "xcache" ], - "time": "2019-11-29T15:36:20+00:00" + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcache", + "type": "tidelift" + } + ], + "time": "2020-05-27T16:24:54+00:00" }, { "name": "doctrine/dbal", @@ -494,20 +560,20 @@ }, { "name": "doctrine/inflector", - "version": "2.0.1", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "18b995743e7ec8b15fd6efc594f0fa3de4bfe6d7" + "reference": "9cf661f4eb38f7c881cac67c75ea9b00bf97b210" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/18b995743e7ec8b15fd6efc594f0fa3de4bfe6d7", - "reference": "18b995743e7ec8b15fd6efc594f0fa3de4bfe6d7", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/9cf661f4eb38f7c881cac67c75ea9b00bf97b210", + "reference": "9cf661f4eb38f7c881cac67c75ea9b00bf97b210", "shasum": "" }, "require": { - "php": "^7.2" + "php": "^7.2 || ^8.0" }, "require-dev": { "doctrine/coding-standard": "^7.0", @@ -581,24 +647,24 @@ "type": "tidelift" } ], - "time": "2020-05-11T11:25:59+00:00" + "time": "2020-05-29T15:13:26+00:00" }, { "name": "doctrine/lexer", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6" + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6", - "reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/e864bbf5904cb8f5bb334f99209b48018522f042", + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042", "shasum": "" }, "require": { - "php": "^7.2" + "php": "^7.2 || ^8.0" }, "require-dev": { "doctrine/coding-standard": "^6.0", @@ -643,7 +709,21 @@ "parser", "php" ], - "time": "2019-10-30T14:39:59+00:00" + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], + "time": "2020-05-25T17:44:05+00:00" }, { "name": "dompdf/dompdf", @@ -987,16 +1067,16 @@ }, { "name": "guzzlehttp/guzzle", - "version": "6.5.3", + "version": "6.5.4", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "aab4ebd862aa7d04f01a4b51849d657db56d882e" + "reference": "a4a1b6930528a8f7ee03518e6442ec7a44155d9d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/aab4ebd862aa7d04f01a4b51849d657db56d882e", - "reference": "aab4ebd862aa7d04f01a4b51849d657db56d882e", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/a4a1b6930528a8f7ee03518e6442ec7a44155d9d", + "reference": "a4a1b6930528a8f7ee03518e6442ec7a44155d9d", "shasum": "" }, "require": { @@ -1004,7 +1084,7 @@ "guzzlehttp/promises": "^1.0", "guzzlehttp/psr7": "^1.6.1", "php": ">=5.5", - "symfony/polyfill-intl-idn": "^1.11" + "symfony/polyfill-intl-idn": "1.17.0" }, "require-dev": { "ext-curl": "*", @@ -1050,7 +1130,7 @@ "rest", "web service" ], - "time": "2020-04-18T10:38:46+00:00" + "time": "2020-05-25T19:35:05+00:00" }, { "name": "guzzlehttp/promises", @@ -1298,96 +1378,6 @@ ], "time": "2020-03-03T19:18:15+00:00" }, - { - "name": "jakub-onderka/php-console-color", - "version": "v0.2", - "source": { - "type": "git", - "url": "https://github.com/JakubOnderka/PHP-Console-Color.git", - "reference": "d5deaecff52a0d61ccb613bb3804088da0307191" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/d5deaecff52a0d61ccb613bb3804088da0307191", - "reference": "d5deaecff52a0d61ccb613bb3804088da0307191", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "jakub-onderka/php-code-style": "1.0", - "jakub-onderka/php-parallel-lint": "1.0", - "jakub-onderka/php-var-dump-check": "0.*", - "phpunit/phpunit": "~4.3", - "squizlabs/php_codesniffer": "1.*" - }, - "type": "library", - "autoload": { - "psr-4": { - "JakubOnderka\\PhpConsoleColor\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-2-Clause" - ], - "authors": [ - { - "name": "Jakub Onderka", - "email": "jakub.onderka@gmail.com" - } - ], - "abandoned": "php-parallel-lint/php-console-color", - "time": "2018-09-29T17:23:10+00:00" - }, - { - "name": "jakub-onderka/php-console-highlighter", - "version": "v0.4", - "source": { - "type": "git", - "url": "https://github.com/JakubOnderka/PHP-Console-Highlighter.git", - "reference": "9f7a229a69d52506914b4bc61bfdb199d90c5547" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Highlighter/zipball/9f7a229a69d52506914b4bc61bfdb199d90c5547", - "reference": "9f7a229a69d52506914b4bc61bfdb199d90c5547", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "jakub-onderka/php-console-color": "~0.2", - "php": ">=5.4.0" - }, - "require-dev": { - "jakub-onderka/php-code-style": "~1.0", - "jakub-onderka/php-parallel-lint": "~1.0", - "jakub-onderka/php-var-dump-check": "~0.1", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~1.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "JakubOnderka\\PhpConsoleHighlighter\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jakub Onderka", - "email": "acci@acci.cz", - "homepage": "http://www.acci.cz/" - } - ], - "description": "Highlight PHP code in terminal", - "abandoned": "php-parallel-lint/php-console-highlighter", - "time": "2018-09-29T18:48:56+00:00" - }, { "name": "jeremeamia/superclosure", "version": "2.4.0", @@ -1449,22 +1439,22 @@ }, { "name": "kalnoy/nestedset", - "version": "v5.0.0", + "version": "v5.0.1", "source": { "type": "git", "url": "https://github.com/lazychaser/laravel-nestedset.git", - "reference": "9c0ae248f38289147a5094fa0c5ba9bb9e93104b" + "reference": "d4fe17f9abd3414014bda32a5612c9ed24246f99" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lazychaser/laravel-nestedset/zipball/9c0ae248f38289147a5094fa0c5ba9bb9e93104b", - "reference": "9c0ae248f38289147a5094fa0c5ba9bb9e93104b", + "url": "https://api.github.com/repos/lazychaser/laravel-nestedset/zipball/d4fe17f9abd3414014bda32a5612c9ed24246f99", + "reference": "d4fe17f9abd3414014bda32a5612c9ed24246f99", "shasum": "" }, "require": { - "illuminate/database": "~5.7.0|~5.8.0|~6.0", - "illuminate/events": "~5.7.0|~5.8.0|~6.0", - "illuminate/support": "~5.7.0|~5.8.0|~6.0", + "illuminate/database": "~5.7.0|~5.8.0|^6.0|^7.0", + "illuminate/events": "~5.7.0|~5.8.0|^6.0|^7.0", + "illuminate/support": "~5.7.0|~5.8.0|^6.0|^7.0", "php": ">=7.1.3" }, "require-dev": { @@ -1504,7 +1494,7 @@ "nested sets", "nsm" ], - "time": "2019-09-06T06:18:32+00:00" + "time": "2020-03-04T05:33:20+00:00" }, { "name": "konekt/concord", @@ -1681,16 +1671,16 @@ }, { "name": "laravel/framework", - "version": "v6.18.15", + "version": "v7.14.1", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "a1fa3ddc0bb5285cafa6844b443633f7627d75dc" + "reference": "469b7719a8dca40841a74f59f2e9f30f01d3a106" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/a1fa3ddc0bb5285cafa6844b443633f7627d75dc", - "reference": "a1fa3ddc0bb5285cafa6844b443633f7627d75dc", + "url": "https://api.github.com/repos/laravel/framework/zipball/469b7719a8dca40841a74f59f2e9f30f01d3a106", + "reference": "469b7719a8dca40841a74f59f2e9f30f01d3a106", "shasum": "" }, "require": { @@ -1701,30 +1691,35 @@ "ext-mbstring": "*", "ext-openssl": "*", "league/commonmark": "^1.3", - "league/flysystem": "^1.0.8", - "monolog/monolog": "^1.12|^2.0", - "nesbot/carbon": "^2.0", + "league/flysystem": "^1.0.34", + "monolog/monolog": "^2.0", + "nesbot/carbon": "^2.17", "opis/closure": "^3.1", - "php": "^7.2", + "php": "^7.2.5", "psr/container": "^1.0", "psr/simple-cache": "^1.0", - "ramsey/uuid": "^3.7", + "ramsey/uuid": "^3.7|^4.0", "swiftmailer/swiftmailer": "^6.0", - "symfony/console": "^4.3.4", - "symfony/debug": "^4.3.4", - "symfony/finder": "^4.3.4", - "symfony/http-foundation": "^4.3.4", - "symfony/http-kernel": "^4.3.4", + "symfony/console": "^5.0", + "symfony/error-handler": "^5.0", + "symfony/finder": "^5.0", + "symfony/http-foundation": "^5.0", + "symfony/http-kernel": "^5.0", + "symfony/mime": "^5.0", "symfony/polyfill-php73": "^1.17", - "symfony/process": "^4.3.4", - "symfony/routing": "^4.3.4", - "symfony/var-dumper": "^4.3.4", - "tijsverkoyen/css-to-inline-styles": "^2.2.1", - "vlucas/phpdotenv": "^3.3" + "symfony/process": "^5.0", + "symfony/routing": "^5.0", + "symfony/var-dumper": "^5.0", + "tijsverkoyen/css-to-inline-styles": "^2.2.2", + "vlucas/phpdotenv": "^4.0", + "voku/portable-ascii": "^1.4.8" }, "conflict": { "tightenco/collect": "<5.5.33" }, + "provide": { + "psr/container-implementation": "1.0" + }, "replace": { "illuminate/auth": "self.version", "illuminate/broadcasting": "self.version", @@ -1751,6 +1746,7 @@ "illuminate/routing": "self.version", "illuminate/session": "self.version", "illuminate/support": "self.version", + "illuminate/testing": "self.version", "illuminate/translation": "self.version", "illuminate/validation": "self.version", "illuminate/view": "self.version" @@ -1759,15 +1755,15 @@ "aws/aws-sdk-php": "^3.0", "doctrine/dbal": "^2.6", "filp/whoops": "^2.4", - "guzzlehttp/guzzle": "^6.3|^7.0", + "guzzlehttp/guzzle": "^6.3.1|^7.0", "league/flysystem-cached-adapter": "^1.0", "mockery/mockery": "^1.3.1", "moontoast/math": "^1.1", - "orchestra/testbench-core": "^4.0", + "orchestra/testbench-core": "^5.0", "pda/pheanstalk": "^4.0", - "phpunit/phpunit": "^7.5.15|^8.4|^9.0", + "phpunit/phpunit": "^8.4|^9.0", "predis/predis": "^1.1.1", - "symfony/cache": "^4.3.4" + "symfony/cache": "^5.0" }, "suggest": { "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.0).", @@ -1779,24 +1775,27 @@ "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).", "filp/whoops": "Required for friendly error pages in development (^2.4).", "fzaninotto/faker": "Required to use the eloquent factory builder (^1.9.1).", - "guzzlehttp/guzzle": "Required to use the Mailgun mail driver and the ping methods on schedules (^6.0|^7.0).", + "guzzlehttp/guzzle": "Required to use the HTTP Client, Mailgun mail driver and the ping methods on schedules (^6.3.1|^7.0).", "laravel/tinker": "Required to use the tinker console command (^2.0).", "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^1.0).", "league/flysystem-cached-adapter": "Required to use the Flysystem cache (^1.0).", "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0).", + "mockery/mockery": "Required to use mocking (^1.3.1).", "moontoast/math": "Required to use ordered UUIDs (^1.1).", "nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).", "pda/pheanstalk": "Required to use the beanstalk queue driver (^4.0).", + "phpunit/phpunit": "Required to use assertions and run tests (^8.4|^9.0).", "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^4.0).", - "symfony/cache": "Required to PSR-6 cache bridge (^4.3.4).", - "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^1.2).", + "symfony/cache": "Required to PSR-6 cache bridge (^5.0).", + "symfony/filesystem": "Required to create relative storage directory symbolic links (^5.0).", + "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^2.0).", "wildbit/swiftmailer-postmark": "Required to use Postmark mail driver (^3.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.x-dev" + "dev-master": "7.x-dev" } }, "autoload": { @@ -1824,93 +1823,41 @@ "framework", "laravel" ], - "time": "2020-05-19T17:03:02+00:00" - }, - { - "name": "laravel/helpers", - "version": "v1.2.0", - "source": { - "type": "git", - "url": "https://github.com/laravel/helpers.git", - "reference": "1f978fc5dad9f7f906b18242c654252615201de4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laravel/helpers/zipball/1f978fc5dad9f7f906b18242c654252615201de4", - "reference": "1f978fc5dad9f7f906b18242c654252615201de4", - "shasum": "" - }, - "require": { - "illuminate/support": "~5.8.0|^6.0|^7.0", - "php": ">=7.1.3" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "files": [ - "src/helpers.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - }, - { - "name": "Dries Vints", - "email": "dries.vints@gmail.com" - } - ], - "description": "Provides backwards compatibility for helpers in the latest Laravel release.", - "keywords": [ - "helpers", - "laravel" - ], - "time": "2020-03-03T13:52:16+00:00" + "time": "2020-06-02T22:34:18+00:00" }, { "name": "laravel/tinker", - "version": "v1.0.10", + "version": "v2.4.0", "source": { "type": "git", "url": "https://github.com/laravel/tinker.git", - "reference": "ad571aacbac1539c30d480908f9d0c9614eaf1a7" + "reference": "cde90a7335a2130a4488beb68f4b2141869241db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/tinker/zipball/ad571aacbac1539c30d480908f9d0c9614eaf1a7", - "reference": "ad571aacbac1539c30d480908f9d0c9614eaf1a7", + "url": "https://api.github.com/repos/laravel/tinker/zipball/cde90a7335a2130a4488beb68f4b2141869241db", + "reference": "cde90a7335a2130a4488beb68f4b2141869241db", "shasum": "" }, "require": { - "illuminate/console": "~5.1|^6.0", - "illuminate/contracts": "~5.1|^6.0", - "illuminate/support": "~5.1|^6.0", - "php": ">=5.5.9", - "psy/psysh": "0.7.*|0.8.*|0.9.*", - "symfony/var-dumper": "~3.0|~4.0" + "illuminate/console": "^6.0|^7.0|^8.0", + "illuminate/contracts": "^6.0|^7.0|^8.0", + "illuminate/support": "^6.0|^7.0|^8.0", + "php": "^7.2", + "psy/psysh": "^0.10.3", + "symfony/var-dumper": "^4.3|^5.0" }, "require-dev": { - "phpunit/phpunit": "~4.0|~5.0" + "mockery/mockery": "^1.3.1", + "phpunit/phpunit": "^8.4|^9.0" }, "suggest": { - "illuminate/database": "The Illuminate Database package (~5.1)." + "illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "2.x-dev" }, "laravel": { "providers": [ @@ -1940,20 +1887,20 @@ "laravel", "psysh" ], - "time": "2019-08-07T15:10:45+00:00" + "time": "2020-04-07T15:01:31+00:00" }, { "name": "lcobucci/jwt", - "version": "3.3.1", + "version": "3.3.2", "source": { "type": "git", "url": "https://github.com/lcobucci/jwt.git", - "reference": "a11ec5f4b4d75d1fcd04e133dede4c317aac9e18" + "reference": "56f10808089e38623345e28af2f2d5e4eb579455" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lcobucci/jwt/zipball/a11ec5f4b4d75d1fcd04e133dede4c317aac9e18", - "reference": "a11ec5f4b4d75d1fcd04e133dede4c317aac9e18", + "url": "https://api.github.com/repos/lcobucci/jwt/zipball/56f10808089e38623345e28af2f2d5e4eb579455", + "reference": "56f10808089e38623345e28af2f2d5e4eb579455", "shasum": "" }, "require": { @@ -1995,7 +1942,17 @@ "JWS", "jwt" ], - "time": "2019-05-24T18:30:49+00:00" + "funding": [ + { + "url": "https://github.com/lcobucci", + "type": "github" + }, + { + "url": "https://www.patreon.com/lcobucci", + "type": "patreon" + } + ], + "time": "2020-05-22T08:21:12+00:00" }, { "name": "league/commonmark", @@ -2189,21 +2146,21 @@ }, { "name": "maatwebsite/excel", - "version": "3.1.18", + "version": "3.1.19", "source": { "type": "git", "url": "https://github.com/Maatwebsite/Laravel-Excel.git", - "reference": "d0231ab1f4bb93c8695630cb445ada1fdc54add0" + "reference": "96527a9ebc2e79e9a5fa7eaef7e23c9e9bcc587c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Maatwebsite/Laravel-Excel/zipball/d0231ab1f4bb93c8695630cb445ada1fdc54add0", - "reference": "d0231ab1f4bb93c8695630cb445ada1fdc54add0", + "url": "https://api.github.com/repos/Maatwebsite/Laravel-Excel/zipball/96527a9ebc2e79e9a5fa7eaef7e23c9e9bcc587c", + "reference": "96527a9ebc2e79e9a5fa7eaef7e23c9e9bcc587c", "shasum": "" }, "require": { "ext-json": "*", - "illuminate/support": "5.5.*|5.6.*|5.7.*|5.8.*|^6.0", + "illuminate/support": "5.5.*|5.6.*|5.7.*|5.8.*|^6.0|^7.0", "php": "^7.0", "phpoffice/phpspreadsheet": "^1.10" }, @@ -2252,7 +2209,84 @@ "php", "phpspreadsheet" ], - "time": "2019-12-24T10:40:12+00:00" + "funding": [ + { + "url": "https://laravel-excel.com/commercial-support", + "type": "custom" + }, + { + "url": "https://github.com/patrickbrouwers", + "type": "github" + } + ], + "time": "2020-02-28T15:47:45+00:00" + }, + { + "name": "maennchen/zipstream-php", + "version": "2.1.0", + "source": { + "type": "git", + "url": "https://github.com/maennchen/ZipStream-PHP.git", + "reference": "c4c5803cc1f93df3d2448478ef79394a5981cc58" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/c4c5803cc1f93df3d2448478ef79394a5981cc58", + "reference": "c4c5803cc1f93df3d2448478ef79394a5981cc58", + "shasum": "" + }, + "require": { + "myclabs/php-enum": "^1.5", + "php": ">= 7.1", + "psr/http-message": "^1.0", + "symfony/polyfill-mbstring": "^1.0" + }, + "require-dev": { + "ext-zip": "*", + "guzzlehttp/guzzle": ">= 6.3", + "mikey179/vfsstream": "^1.6", + "phpunit/phpunit": ">= 7.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "ZipStream\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paul Duncan", + "email": "pabs@pablotron.org" + }, + { + "name": "Jonatan Männchen", + "email": "jonatan@maennchen.ch" + }, + { + "name": "Jesse Donat", + "email": "donatj@gmail.com" + }, + { + "name": "András Kolesár", + "email": "kolesar@kolesar.hu" + } + ], + "description": "ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.", + "keywords": [ + "stream", + "zip" + ], + "funding": [ + { + "url": "https://opencollective.com/zipstream", + "type": "open_collective" + } + ], + "time": "2020-05-30T13:11:16+00:00" }, { "name": "markbaker/complex", @@ -2481,20 +2515,20 @@ }, { "name": "monolog/monolog", - "version": "2.0.2", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "c861fcba2ca29404dc9e617eedd9eff4616986b8" + "reference": "38914429aac460e8e4616c8cb486ecb40ec90bb1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/c861fcba2ca29404dc9e617eedd9eff4616986b8", - "reference": "c861fcba2ca29404dc9e617eedd9eff4616986b8", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/38914429aac460e8e4616c8cb486ecb40ec90bb1", + "reference": "38914429aac460e8e4616c8cb486ecb40ec90bb1", "shasum": "" }, "require": { - "php": "^7.2", + "php": ">=7.2", "psr/log": "^1.0.1" }, "provide": { @@ -2505,11 +2539,11 @@ "doctrine/couchdb": "~1.0@dev", "elasticsearch/elasticsearch": "^6.0", "graylog2/gelf-php": "^1.4.2", - "jakub-onderka/php-parallel-lint": "^0.9", "php-amqplib/php-amqplib": "~2.4", "php-console/php-console": "^3.1.3", + "php-parallel-lint/php-parallel-lint": "^1.0", "phpspec/prophecy": "^1.6.1", - "phpunit/phpunit": "^8.3", + "phpunit/phpunit": "^8.5", "predis/predis": "^1.1", "rollbar/rollbar": "^1.3", "ruflin/elastica": ">=0.90 <3.0", @@ -2558,7 +2592,63 @@ "logging", "psr-3" ], - "time": "2019-12-20T14:22:59+00:00" + "funding": [ + { + "url": "https://github.com/Seldaek", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", + "type": "tidelift" + } + ], + "time": "2020-05-22T08:12:19+00:00" + }, + { + "name": "myclabs/php-enum", + "version": "1.7.6", + "source": { + "type": "git", + "url": "https://github.com/myclabs/php-enum.git", + "reference": "5f36467c7a87e20fbdc51e524fd8f9d1de80187c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/php-enum/zipball/5f36467c7a87e20fbdc51e524fd8f9d1de80187c", + "reference": "5f36467c7a87e20fbdc51e524fd8f9d1de80187c", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7", + "squizlabs/php_codesniffer": "1.*", + "vimeo/psalm": "^3.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "MyCLabs\\Enum\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP Enum contributors", + "homepage": "https://github.com/myclabs/php-enum/graphs/contributors" + } + ], + "description": "PHP Enum implementation", + "homepage": "http://github.com/myclabs/php-enum", + "keywords": [ + "enum" + ], + "time": "2020-02-14T08:15:52+00:00" }, { "name": "namshi/jose", @@ -2625,16 +2715,16 @@ }, { "name": "nesbot/carbon", - "version": "2.34.2", + "version": "2.35.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "3e87404329b8072295ea11d548b47a1eefe5a162" + "reference": "4b9bd835261ef23d36397a46a76b496a458305e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/3e87404329b8072295ea11d548b47a1eefe5a162", - "reference": "3e87404329b8072295ea11d548b47a1eefe5a162", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/4b9bd835261ef23d36397a46a76b496a458305e5", + "reference": "4b9bd835261ef23d36397a46a76b496a458305e5", "shasum": "" }, "require": { @@ -2704,20 +2794,20 @@ "type": "tidelift" } ], - "time": "2020-05-19T22:14:16+00:00" + "time": "2020-05-24T18:27:52+00:00" }, { "name": "nikic/php-parser", - "version": "v4.4.0", + "version": "v4.5.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "bd43ec7152eaaab3bd8c6d0aa95ceeb1df8ee120" + "reference": "53c2753d756f5adb586dca79c2ec0e2654dd9463" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/bd43ec7152eaaab3bd8c6d0aa95ceeb1df8ee120", - "reference": "bd43ec7152eaaab3bd8c6d0aa95ceeb1df8ee120", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/53c2753d756f5adb586dca79c2ec0e2654dd9463", + "reference": "53c2753d756f5adb586dca79c2ec0e2654dd9463", "shasum": "" }, "require": { @@ -2756,20 +2846,20 @@ "parser", "php" ], - "time": "2020-04-10T16:34:50+00:00" + "time": "2020-06-03T07:24:19+00:00" }, { "name": "opis/closure", - "version": "3.5.1", + "version": "3.5.4", "source": { "type": "git", "url": "https://github.com/opis/closure.git", - "reference": "93ebc5712cdad8d5f489b500c59d122df2e53969" + "reference": "1d0deef692f66dae5d70663caee2867d0971306b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opis/closure/zipball/93ebc5712cdad8d5f489b500c59d122df2e53969", - "reference": "93ebc5712cdad8d5f489b500c59d122df2e53969", + "url": "https://api.github.com/repos/opis/closure/zipball/1d0deef692f66dae5d70663caee2867d0971306b", + "reference": "1d0deef692f66dae5d70663caee2867d0971306b", "shasum": "" }, "require": { @@ -2817,52 +2907,7 @@ "serialization", "serialize" ], - "time": "2019-11-29T22:36:02+00:00" - }, - { - "name": "paragonie/random_compat", - "version": "v9.99.99", - "source": { - "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", - "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", - "shasum": "" - }, - "require": { - "php": "^7" - }, - "require-dev": { - "phpunit/phpunit": "4.*|5.*", - "vimeo/psalm": "^1" - }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." - }, - "type": "library", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": [ - "csprng", - "polyfill", - "pseudorandom", - "random" - ], - "time": "2018-07-02T15:55:56+00:00" + "time": "2020-06-07T11:41:29+00:00" }, { "name": "phenx/php-font-lib", @@ -2943,16 +2988,16 @@ }, { "name": "phpoffice/phpspreadsheet", - "version": "1.12.0", + "version": "1.13.0", "source": { "type": "git", "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", - "reference": "f79611d6dc1f6b7e8e30b738fc371b392001dbfd" + "reference": "21bfb5b3243b8ceb9eda499a4d699fc42c11a9d1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/f79611d6dc1f6b7e8e30b738fc371b392001dbfd", - "reference": "f79611d6dc1f6b7e8e30b738fc371b392001dbfd", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/21bfb5b3243b8ceb9eda499a4d699fc42c11a9d1", + "reference": "21bfb5b3243b8ceb9eda499a4d699fc42c11a9d1", "shasum": "" }, "require": { @@ -2969,18 +3014,19 @@ "ext-xmlwriter": "*", "ext-zip": "*", "ext-zlib": "*", + "maennchen/zipstream-php": "^2.0", "markbaker/complex": "^1.4", "markbaker/matrix": "^1.2", - "php": "^7.1", + "php": "^7.2", "psr/simple-cache": "^1.0" }, "require-dev": { - "dompdf/dompdf": "^0.8.3", + "dompdf/dompdf": "^0.8.5", "friendsofphp/php-cs-fixer": "^2.16", "jpgraph/jpgraph": "^4.0", "mpdf/mpdf": "^8.0", "phpcompatibility/php-compatibility": "^9.3", - "phpunit/phpunit": "^7.5", + "phpunit/phpunit": "^8.5", "squizlabs/php_codesniffer": "^3.5", "tecnickcom/tcpdf": "^6.3" }, @@ -3032,20 +3078,20 @@ "xls", "xlsx" ], - "time": "2020-04-27T08:12:48+00:00" + "time": "2020-05-31T13:49:28+00:00" }, { "name": "phpoption/phpoption", - "version": "1.7.3", + "version": "1.7.4", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "4acfd6a4b33a509d8c88f50e5222f734b6aeebae" + "reference": "b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/4acfd6a4b33a509d8c88f50e5222f734b6aeebae", - "reference": "4acfd6a4b33a509d8c88f50e5222f734b6aeebae", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3", + "reference": "b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3", "shasum": "" }, "require": { @@ -3087,20 +3133,30 @@ "php", "type" ], - "time": "2020-03-21T18:07:53+00:00" + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption", + "type": "tidelift" + } + ], + "time": "2020-06-07T10:40:07+00:00" }, { "name": "prettus/l5-repository", - "version": "2.6.44", + "version": "2.6.45", "source": { "type": "git", "url": "https://github.com/andersao/l5-repository.git", - "reference": "8c8db9895745dc35eb471a8f048ff9c000a3ccdd" + "reference": "c4d9d5834445e13d9ea0f00bfa23c67a0202aab1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/andersao/l5-repository/zipball/8c8db9895745dc35eb471a8f048ff9c000a3ccdd", - "reference": "8c8db9895745dc35eb471a8f048ff9c000a3ccdd", + "url": "https://api.github.com/repos/andersao/l5-repository/zipball/c4d9d5834445e13d9ea0f00bfa23c67a0202aab1", + "reference": "c4d9d5834445e13d9ea0f00bfa23c67a0202aab1", "shasum": "" }, "require": { @@ -3153,7 +3209,7 @@ "model", "repository" ], - "time": "2020-05-15T08:22:53+00:00" + "time": "2020-05-22T06:32:04+00:00" }, { "name": "prettus/laravel-validation", @@ -3247,6 +3303,52 @@ ], "time": "2017-02-14T16:28:37+00:00" }, + { + "name": "psr/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "time": "2019-01-08T18:20:26+00:00" + }, { "name": "psr/http-message", "version": "1.0.1", @@ -3394,32 +3496,30 @@ }, { "name": "psy/psysh", - "version": "v0.9.12", + "version": "v0.10.4", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "90da7f37568aee36b116a030c5f99c915267edd4" + "reference": "a8aec1b2981ab66882a01cce36a49b6317dc3560" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/90da7f37568aee36b116a030c5f99c915267edd4", - "reference": "90da7f37568aee36b116a030c5f99c915267edd4", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/a8aec1b2981ab66882a01cce36a49b6317dc3560", + "reference": "a8aec1b2981ab66882a01cce36a49b6317dc3560", "shasum": "" }, "require": { "dnoegel/php-xdg-base-dir": "0.1.*", "ext-json": "*", "ext-tokenizer": "*", - "jakub-onderka/php-console-highlighter": "0.3.*|0.4.*", - "nikic/php-parser": "~1.3|~2.0|~3.0|~4.0", - "php": ">=5.4.0", - "symfony/console": "~2.3.10|^2.4.2|~3.0|~4.0|~5.0", - "symfony/var-dumper": "~2.7|~3.0|~4.0|~5.0" + "nikic/php-parser": "~4.0|~3.0|~2.0|~1.3", + "php": "^8.0 || ^7.0 || ^5.5.9", + "symfony/console": "~5.0|~4.0|~3.0|^2.4.2|~2.3.10", + "symfony/var-dumper": "~5.0|~4.0|~3.0|~2.7" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.2", - "hoa/console": "~2.15|~3.16", - "phpunit/phpunit": "~4.8.35|~5.0|~6.0|~7.0" + "hoa/console": "3.17.*" }, "suggest": { "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", @@ -3434,7 +3534,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-develop": "0.9.x-dev" + "dev-master": "0.10.x-dev" } }, "autoload": { @@ -3464,7 +3564,7 @@ "interactive", "shell" ], - "time": "2019-12-06T14:19:43+00:00" + "time": "2020-05-03T19:32:03+00:00" }, { "name": "ralouphie/getallheaders", @@ -3507,54 +3607,124 @@ "time": "2019-03-08T08:55:37+00:00" }, { - "name": "ramsey/uuid", - "version": "3.9.3", + "name": "ramsey/collection", + "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/ramsey/uuid.git", - "reference": "7e1633a6964b48589b142d60542f9ed31bd37a92" + "url": "https://github.com/ramsey/collection.git", + "reference": "925ad8cf55ba7a3fc92e332c58fd0478ace3e1ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/7e1633a6964b48589b142d60542f9ed31bd37a92", - "reference": "7e1633a6964b48589b142d60542f9ed31bd37a92", + "url": "https://api.github.com/repos/ramsey/collection/zipball/925ad8cf55ba7a3fc92e332c58fd0478ace3e1ca", + "reference": "925ad8cf55ba7a3fc92e332c58fd0478ace3e1ca", "shasum": "" }, "require": { + "php": "^7.2" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0", + "fzaninotto/faker": "^1.5", + "jakub-onderka/php-parallel-lint": "^1", + "jangregor/phpstan-prophecy": "^0.6", + "mockery/mockery": "^1.3", + "phpstan/extension-installer": "^1", + "phpstan/phpdoc-parser": "0.4.1", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-mockery": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^8.5", + "slevomat/coding-standard": "^6.0", + "squizlabs/php_codesniffer": "^3.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Ramsey\\Collection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ben Ramsey", + "email": "ben@benramsey.com", + "homepage": "https://benramsey.com" + } + ], + "description": "A PHP 7.2+ library for representing and manipulating collections.", + "homepage": "https://github.com/ramsey/collection", + "keywords": [ + "array", + "collection", + "hash", + "map", + "queue", + "set" + ], + "time": "2020-01-05T00:22:59+00:00" + }, + { + "name": "ramsey/uuid", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/ramsey/uuid.git", + "reference": "ba8fff1d3abb8bb4d35a135ed22a31c6ef3ede3d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/ba8fff1d3abb8bb4d35a135ed22a31c6ef3ede3d", + "reference": "ba8fff1d3abb8bb4d35a135ed22a31c6ef3ede3d", + "shasum": "" + }, + "require": { + "brick/math": "^0.8", "ext-json": "*", - "paragonie/random_compat": "^1 | ^2 | 9.99.99", - "php": "^5.4 | ^7 | ^8", + "php": "^7.2 || ^8", + "ramsey/collection": "^1.0", "symfony/polyfill-ctype": "^1.8" }, "replace": { "rhumsaa/uuid": "self.version" }, "require-dev": { - "codeception/aspect-mock": "^1 | ^2", - "doctrine/annotations": "^1.2", - "goaop/framework": "1.0.0-alpha.2 | ^1 | ^2.1", - "jakub-onderka/php-parallel-lint": "^1", - "mockery/mockery": "^0.9.11 | ^1", + "codeception/aspect-mock": "^3", + "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2", + "doctrine/annotations": "^1.8", + "goaop/framework": "^2", + "mockery/mockery": "^1.3", "moontoast/math": "^1.1", "paragonie/random-lib": "^2", - "php-mock/php-mock-phpunit": "^0.3 | ^1.1", - "phpunit/phpunit": "^4.8 | ^5.4 | ^6.5", - "squizlabs/php_codesniffer": "^3.5" + "php-mock/php-mock-mockery": "^1.3", + "php-mock/php-mock-phpunit": "^2.5", + "php-parallel-lint/php-parallel-lint": "^1.1", + "phpstan/extension-installer": "^1.0", + "phpstan/phpdoc-parser": "0.4.3", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-mockery": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^8.5", + "psy/psysh": "^0.10.0", + "slevomat/coding-standard": "^6.0", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "3.9.4" }, "suggest": { - "ext-ctype": "Provides support for PHP Ctype functions", - "ext-libsodium": "Provides the PECL libsodium extension for use with the SodiumRandomGenerator", - "ext-openssl": "Provides the OpenSSL extension for use with the OpenSslGenerator", - "ext-uuid": "Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator", - "moontoast/math": "Provides support for converting UUID to 128-bit integer (in string form).", + "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", + "ext-ctype": "Enables faster processing of character classification using ctype functions.", + "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.", + "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.", "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", - "ramsey/uuid-console": "A console application for generating UUIDs with ramsey/uuid", "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.x-dev" + "dev-master": "4.x-dev" } }, "autoload": { @@ -3569,42 +3739,33 @@ "license": [ "MIT" ], - "authors": [ - { - "name": "Ben Ramsey", - "email": "ben@benramsey.com", - "homepage": "https://benramsey.com" - }, - { - "name": "Marijn Huizendveld", - "email": "marijn.huizendveld@gmail.com" - }, - { - "name": "Thibaud Fabre", - "email": "thibaud@aztech.io" - } - ], - "description": "Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).", + "description": "A PHP library for generating and working with universally unique identifiers (UUIDs).", "homepage": "https://github.com/ramsey/uuid", "keywords": [ "guid", "identifier", "uuid" ], - "time": "2020-02-21T04:36:14+00:00" + "funding": [ + { + "url": "https://github.com/ramsey", + "type": "github" + } + ], + "time": "2020-03-29T20:13:32+00:00" }, { "name": "sabberworm/php-css-parser", - "version": "8.3.0", + "version": "8.3.1", "source": { "type": "git", "url": "https://github.com/sabberworm/PHP-CSS-Parser.git", - "reference": "91bcc3e3fdb7386c9a2e0e0aa09ca75cc43f121f" + "reference": "d217848e1396ef962fb1997cf3e2421acba7f796" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sabberworm/PHP-CSS-Parser/zipball/91bcc3e3fdb7386c9a2e0e0aa09ca75cc43f121f", - "reference": "91bcc3e3fdb7386c9a2e0e0aa09ca75cc43f121f", + "url": "https://api.github.com/repos/sabberworm/PHP-CSS-Parser/zipball/d217848e1396ef962fb1997cf3e2421acba7f796", + "reference": "d217848e1396ef962fb1997cf3e2421acba7f796", "shasum": "" }, "require": { @@ -3636,7 +3797,7 @@ "parser", "stylesheet" ], - "time": "2019-02-22T07:42:52+00:00" + "time": "2020-06-01T09:10:00+00:00" }, { "name": "swiftmailer/swiftmailer", @@ -3702,41 +3863,44 @@ }, { "name": "symfony/console", - "version": "v4.4.8", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "10bb3ee3c97308869d53b3e3d03f6ac23ff985f7" + "reference": "00bed125812716d09b163f0727ef33bb49bf3448" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/10bb3ee3c97308869d53b3e3d03f6ac23ff985f7", - "reference": "10bb3ee3c97308869d53b3e3d03f6ac23ff985f7", + "url": "https://api.github.com/repos/symfony/console/zipball/00bed125812716d09b163f0727ef33bb49bf3448", + "reference": "00bed125812716d09b163f0727ef33bb49bf3448", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": ">=7.2.5", "symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-php73": "^1.8", - "symfony/service-contracts": "^1.1|^2" + "symfony/polyfill-php80": "^1.15", + "symfony/service-contracts": "^1.1|^2", + "symfony/string": "^5.1" }, "conflict": { - "symfony/dependency-injection": "<3.4", - "symfony/event-dispatcher": "<4.3|>=5", + "symfony/dependency-injection": "<4.4", + "symfony/dotenv": "<5.1", + "symfony/event-dispatcher": "<4.4", "symfony/lock": "<4.4", - "symfony/process": "<3.3" + "symfony/process": "<4.4" }, "provide": { "psr/log-implementation": "1.0" }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "^3.4|^4.0|^5.0", - "symfony/dependency-injection": "^3.4|^4.0|^5.0", - "symfony/event-dispatcher": "^4.3", + "symfony/config": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/event-dispatcher": "^4.4|^5.0", "symfony/lock": "^4.4|^5.0", - "symfony/process": "^3.4|^4.0|^5.0", - "symfony/var-dumper": "^4.3|^5.0" + "symfony/process": "^4.4|^5.0", + "symfony/var-dumper": "^4.4|^5.0" }, "suggest": { "psr/log": "For using the console logger", @@ -3747,7 +3911,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -3788,29 +3952,29 @@ "type": "tidelift" } ], - "time": "2020-03-30T11:41:10+00:00" + "time": "2020-05-30T20:35:19+00:00" }, { "name": "symfony/css-selector", - "version": "v5.0.8", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "5f8d5271303dad260692ba73dfa21777d38e124e" + "reference": "e544e24472d4c97b2d11ade7caacd446727c6bf9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/5f8d5271303dad260692ba73dfa21777d38e124e", - "reference": "5f8d5271303dad260692ba73dfa21777d38e124e", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/e544e24472d4c97b2d11ade7caacd446727c6bf9", + "reference": "e544e24472d4c97b2d11ade7caacd446727c6bf9", "shasum": "" }, "require": { - "php": "^7.2.5" + "php": ">=7.2.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -3855,25 +4019,26 @@ "type": "tidelift" } ], - "time": "2020-03-27T16:56:45+00:00" + "time": "2020-05-20T17:43:50+00:00" }, { "name": "symfony/debug", - "version": "v4.4.8", + "version": "v4.4.9", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "346636d2cae417992ecfd761979b2ab98b339a45" + "reference": "28f92d08bb6d1fddf8158e02c194ad43870007e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/346636d2cae417992ecfd761979b2ab98b339a45", - "reference": "346636d2cae417992ecfd761979b2ab98b339a45", + "url": "https://api.github.com/repos/symfony/debug/zipball/28f92d08bb6d1fddf8158e02c194ad43870007e6", + "reference": "28f92d08bb6d1fddf8158e02c194ad43870007e6", "shasum": "" }, "require": { - "php": "^7.1.3", - "psr/log": "~1.0" + "php": ">=7.1.3", + "psr/log": "~1.0", + "symfony/polyfill-php80": "^1.15" }, "conflict": { "symfony/http-kernel": "<3.4" @@ -3925,36 +4090,97 @@ "type": "tidelift" } ], - "time": "2020-03-27T16:54:36+00:00" + "time": "2020-05-24T08:33:35+00:00" }, { - "name": "symfony/error-handler", - "version": "v4.4.8", + "name": "symfony/deprecation-contracts", + "version": "v2.1.2", "source": { "type": "git", - "url": "https://github.com/symfony/error-handler.git", - "reference": "7e9828fc98aa1cf27b422fe478a84f5b0abb7358" + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/7e9828fc98aa1cf27b422fe478a84f5b0abb7358", - "reference": "7e9828fc98aa1cf27b422fe478a84f5b0abb7358", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337", + "reference": "dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337", "shasum": "" }, "require": { - "php": "^7.1.3", - "psr/log": "~1.0", - "symfony/debug": "^4.4.5", + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "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": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "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": "2020-05-27T08:34:37+00:00" + }, + { + "name": "symfony/error-handler", + "version": "v5.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/error-handler.git", + "reference": "7d0b927b9d3dc41d7d46cda38cbfcd20cdcbb896" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/7d0b927b9d3dc41d7d46cda38cbfcd20cdcbb896", + "reference": "7d0b927b9d3dc41d7d46cda38cbfcd20cdcbb896", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/log": "^1.0", + "symfony/polyfill-php80": "^1.15", "symfony/var-dumper": "^4.4|^5.0" }, "require-dev": { + "symfony/deprecation-contracts": "^2.1", "symfony/http-kernel": "^4.4|^5.0", "symfony/serializer": "^4.4|^5.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -3995,41 +4221,43 @@ "type": "tidelift" } ], - "time": "2020-03-30T14:07:33+00:00" + "time": "2020-05-30T20:35:19+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v4.4.8", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "abc8e3618bfdb55e44c8c6a00abd333f831bbfed" + "reference": "cc0d059e2e997e79ca34125a52f3e33de4424ac7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/abc8e3618bfdb55e44c8c6a00abd333f831bbfed", - "reference": "abc8e3618bfdb55e44c8c6a00abd333f831bbfed", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/cc0d059e2e997e79ca34125a52f3e33de4424ac7", + "reference": "cc0d059e2e997e79ca34125a52f3e33de4424ac7", "shasum": "" }, "require": { - "php": "^7.1.3", - "symfony/event-dispatcher-contracts": "^1.1" + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/event-dispatcher-contracts": "^2", + "symfony/polyfill-php80": "^1.15" }, "conflict": { - "symfony/dependency-injection": "<3.4" + "symfony/dependency-injection": "<4.4" }, "provide": { "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "1.1" + "symfony/event-dispatcher-implementation": "2.0" }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "^3.4|^4.0|^5.0", - "symfony/dependency-injection": "^3.4|^4.0|^5.0", - "symfony/expression-language": "^3.4|^4.0|^5.0", - "symfony/http-foundation": "^3.4|^4.0|^5.0", + "symfony/config": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/expression-language": "^4.4|^5.0", + "symfony/http-foundation": "^4.4|^5.0", "symfony/service-contracts": "^1.1|^2", - "symfony/stopwatch": "^3.4|^4.0|^5.0" + "symfony/stopwatch": "^4.4|^5.0" }, "suggest": { "symfony/dependency-injection": "", @@ -4038,7 +4266,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -4079,33 +4307,33 @@ "type": "tidelift" } ], - "time": "2020-03-27T16:54:36+00:00" + "time": "2020-05-20T17:43:50+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v1.1.7", + "version": "v2.1.2", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "c43ab685673fb6c8d84220c77897b1d6cdbe1d18" + "reference": "405952c4e90941a17e52ef7489a2bd94870bb290" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/c43ab685673fb6c8d84220c77897b1d6cdbe1d18", - "reference": "c43ab685673fb6c8d84220c77897b1d6cdbe1d18", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/405952c4e90941a17e52ef7489a2bd94870bb290", + "reference": "405952c4e90941a17e52ef7489a2bd94870bb290", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": ">=7.2.5", + "psr/event-dispatcher": "^1" }, "suggest": { - "psr/event-dispatcher": "", "symfony/event-dispatcher-implementation": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "2.1-dev" } }, "autoload": { @@ -4137,29 +4365,43 @@ "interoperability", "standards" ], - "time": "2019-09-17T09:54:03+00:00" + "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": "2020-05-20T17:43:50+00:00" }, { "name": "symfony/finder", - "version": "v4.4.8", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "5729f943f9854c5781984ed4907bbb817735776b" + "reference": "4298870062bfc667cb78d2b379be4bf5dec5f187" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/5729f943f9854c5781984ed4907bbb817735776b", - "reference": "5729f943f9854c5781984ed4907bbb817735776b", + "url": "https://api.github.com/repos/symfony/finder/zipball/4298870062bfc667cb78d2b379be4bf5dec5f187", + "reference": "4298870062bfc667cb78d2b379be4bf5dec5f187", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": ">=7.2.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -4200,35 +4442,41 @@ "type": "tidelift" } ], - "time": "2020-03-27T16:54:36+00:00" + "time": "2020-05-20T17:43:50+00:00" }, { "name": "symfony/http-foundation", - "version": "v4.4.8", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "ec5bd254c223786f5fa2bb49a1e705c1b8e7cee2" + "reference": "e0d853bddc2b2cfb0d67b0b4496c03fffe1d37fa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/ec5bd254c223786f5fa2bb49a1e705c1b8e7cee2", - "reference": "ec5bd254c223786f5fa2bb49a1e705c1b8e7cee2", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e0d853bddc2b2cfb0d67b0b4496c03fffe1d37fa", + "reference": "e0d853bddc2b2cfb0d67b0b4496c03fffe1d37fa", "shasum": "" }, "require": { - "php": "^7.1.3", - "symfony/mime": "^4.3|^5.0", - "symfony/polyfill-mbstring": "~1.1" + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-mbstring": "~1.1", + "symfony/polyfill-php80": "^1.15" }, "require-dev": { "predis/predis": "~1.0", - "symfony/expression-language": "^3.4|^4.0|^5.0" + "symfony/cache": "^4.4|^5.0", + "symfony/expression-language": "^4.4|^5.0", + "symfony/mime": "^4.4|^5.0" + }, + "suggest": { + "symfony/mime": "To use the file extension guesser" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -4269,59 +4517,68 @@ "type": "tidelift" } ], - "time": "2020-04-18T20:40:08+00:00" + "time": "2020-05-24T12:18:07+00:00" }, { "name": "symfony/http-kernel", - "version": "v4.4.8", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "1799a6c01f0db5851f399151abdb5d6393fec277" + "reference": "75ff5327a7d6ede3ccc2fac3ebca9ed776b3e85c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/1799a6c01f0db5851f399151abdb5d6393fec277", - "reference": "1799a6c01f0db5851f399151abdb5d6393fec277", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/75ff5327a7d6ede3ccc2fac3ebca9ed776b3e85c", + "reference": "75ff5327a7d6ede3ccc2fac3ebca9ed776b3e85c", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": ">=7.2.5", "psr/log": "~1.0", - "symfony/error-handler": "^4.4", - "symfony/event-dispatcher": "^4.4", + "symfony/deprecation-contracts": "^2.1", + "symfony/error-handler": "^4.4|^5.0", + "symfony/event-dispatcher": "^5.0", "symfony/http-foundation": "^4.4|^5.0", "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-php73": "^1.9" + "symfony/polyfill-php73": "^1.9", + "symfony/polyfill-php80": "^1.15" }, "conflict": { - "symfony/browser-kit": "<4.3", - "symfony/config": "<3.4", - "symfony/console": ">=5", - "symfony/dependency-injection": "<4.3", - "symfony/translation": "<4.2", - "twig/twig": "<1.34|<2.4,>=2" + "symfony/browser-kit": "<4.4", + "symfony/cache": "<5.0", + "symfony/config": "<5.0", + "symfony/console": "<4.4", + "symfony/dependency-injection": "<4.4", + "symfony/doctrine-bridge": "<5.0", + "symfony/form": "<5.0", + "symfony/http-client": "<5.0", + "symfony/mailer": "<5.0", + "symfony/messenger": "<5.0", + "symfony/translation": "<5.0", + "symfony/twig-bridge": "<5.0", + "symfony/validator": "<5.0", + "twig/twig": "<2.4" }, "provide": { "psr/log-implementation": "1.0" }, "require-dev": { "psr/cache": "~1.0", - "symfony/browser-kit": "^4.3|^5.0", - "symfony/config": "^3.4|^4.0|^5.0", - "symfony/console": "^3.4|^4.0", - "symfony/css-selector": "^3.4|^4.0|^5.0", - "symfony/dependency-injection": "^4.3|^5.0", - "symfony/dom-crawler": "^3.4|^4.0|^5.0", - "symfony/expression-language": "^3.4|^4.0|^5.0", - "symfony/finder": "^3.4|^4.0|^5.0", - "symfony/process": "^3.4|^4.0|^5.0", - "symfony/routing": "^3.4|^4.0|^5.0", - "symfony/stopwatch": "^3.4|^4.0|^5.0", - "symfony/templating": "^3.4|^4.0|^5.0", - "symfony/translation": "^4.2|^5.0", + "symfony/browser-kit": "^4.4|^5.0", + "symfony/config": "^5.0", + "symfony/console": "^4.4|^5.0", + "symfony/css-selector": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/dom-crawler": "^4.4|^5.0", + "symfony/expression-language": "^4.4|^5.0", + "symfony/finder": "^4.4|^5.0", + "symfony/process": "^4.4|^5.0", + "symfony/routing": "^4.4|^5.0", + "symfony/stopwatch": "^4.4|^5.0", + "symfony/translation": "^4.4|^5.0", "symfony/translation-contracts": "^1.1|^2", - "twig/twig": "^1.34|^2.4|^3.0" + "twig/twig": "^2.4|^3.0" }, "suggest": { "symfony/browser-kit": "", @@ -4332,7 +4589,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -4373,26 +4630,27 @@ "type": "tidelift" } ], - "time": "2020-04-28T18:47:42+00:00" + "time": "2020-05-31T06:14:18+00:00" }, { "name": "symfony/mime", - "version": "v5.0.8", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "5d6c81c39225a750f3f43bee15f03093fb9aaa0b" + "reference": "56261f89385f9d13cf843a5101ac72131190bc91" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/5d6c81c39225a750f3f43bee15f03093fb9aaa0b", - "reference": "5d6c81c39225a750f3f43bee15f03093fb9aaa0b", + "url": "https://api.github.com/repos/symfony/mime/zipball/56261f89385f9d13cf843a5101ac72131190bc91", + "reference": "56261f89385f9d13cf843a5101ac72131190bc91", "shasum": "" }, "require": { - "php": "^7.2.5", + "php": ">=7.2.5", "symfony/polyfill-intl-idn": "^1.10", - "symfony/polyfill-mbstring": "^1.0" + "symfony/polyfill-mbstring": "^1.0", + "symfony/polyfill-php80": "^1.15" }, "conflict": { "symfony/mailer": "<4.4" @@ -4404,7 +4662,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -4449,7 +4707,7 @@ "type": "tidelift" } ], - "time": "2020-04-17T03:29:44+00:00" + "time": "2020-05-25T12:33:44+00:00" }, { "name": "symfony/polyfill-ctype", @@ -4596,6 +4854,80 @@ ], "time": "2020-05-12T16:47:27+00:00" }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.17.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "e094b0770f7833fdf257e6ba4775be4e258230b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/e094b0770f7833fdf257e6ba4775be4e258230b2", + "reference": "e094b0770f7833fdf257e6ba4775be4e258230b2", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.17-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "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 intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "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": "2020-05-12T16:47:27+00:00" + }, { "name": "symfony/polyfill-intl-idn", "version": "v1.17.0", @@ -4672,6 +5004,83 @@ ], "time": "2020-05-12T16:47:27+00:00" }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.17.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "1357b1d168eb7f68ad6a134838e46b0b159444a9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/1357b1d168eb7f68ad6a134838e46b0b159444a9", + "reference": "1357b1d168eb7f68ad6a134838e46b0b159444a9", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.17-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "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 intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "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": "2020-05-12T16:14:59+00:00" + }, { "name": "symfony/polyfill-mbstring", "version": "v1.17.0", @@ -4956,6 +5365,82 @@ ], "time": "2020-05-12T16:47:27+00:00" }, + { + "name": "symfony/polyfill-php80", + "version": "v1.17.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "5e30b2799bc1ad68f7feb62b60a73743589438dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/5e30b2799bc1ad68f7feb62b60a73743589438dd", + "reference": "5e30b2799bc1ad68f7feb62b60a73743589438dd", + "shasum": "" + }, + "require": { + "php": ">=7.0.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.17-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "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": "2020-05-12T16:47:27+00:00" + }, { "name": "symfony/polyfill-util", "version": "v1.17.0", @@ -5024,25 +5509,26 @@ }, { "name": "symfony/process", - "version": "v4.4.8", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "4b6a9a4013baa65d409153cbb5a895bf093dc7f4" + "reference": "7f6378c1fa2147eeb1b4c385856ce9de0d46ebd1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/4b6a9a4013baa65d409153cbb5a895bf093dc7f4", - "reference": "4b6a9a4013baa65d409153cbb5a895bf093dc7f4", + "url": "https://api.github.com/repos/symfony/process/zipball/7f6378c1fa2147eeb1b4c385856ce9de0d46ebd1", + "reference": "7f6378c1fa2147eeb1b4c385856ce9de0d46ebd1", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.15" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -5083,38 +5569,40 @@ "type": "tidelift" } ], - "time": "2020-04-15T15:56:18+00:00" + "time": "2020-05-30T20:35:19+00:00" }, { "name": "symfony/routing", - "version": "v4.4.8", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "67b4e1f99c050cbc310b8f3d0dbdc4b0212c052c" + "reference": "95cf30145b26c758d6d832aa2d0de3128978d556" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/67b4e1f99c050cbc310b8f3d0dbdc4b0212c052c", - "reference": "67b4e1f99c050cbc310b8f3d0dbdc4b0212c052c", + "url": "https://api.github.com/repos/symfony/routing/zipball/95cf30145b26c758d6d832aa2d0de3128978d556", + "reference": "95cf30145b26c758d6d832aa2d0de3128978d556", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-php80": "^1.15" }, "conflict": { - "symfony/config": "<4.2", - "symfony/dependency-injection": "<3.4", - "symfony/yaml": "<3.4" + "symfony/config": "<5.0", + "symfony/dependency-injection": "<4.4", + "symfony/yaml": "<4.4" }, "require-dev": { "doctrine/annotations": "~1.2", "psr/log": "~1.0", - "symfony/config": "^4.2|^5.0", - "symfony/dependency-injection": "^3.4|^4.0|^5.0", - "symfony/expression-language": "^3.4|^4.0|^5.0", - "symfony/http-foundation": "^3.4|^4.0|^5.0", - "symfony/yaml": "^3.4|^4.0|^5.0" + "symfony/config": "^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/expression-language": "^4.4|^5.0", + "symfony/http-foundation": "^4.4|^5.0", + "symfony/yaml": "^4.4|^5.0" }, "suggest": { "doctrine/annotations": "For using the annotation loader", @@ -5126,7 +5614,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -5173,24 +5661,24 @@ "type": "tidelift" } ], - "time": "2020-04-21T19:59:53+00:00" + "time": "2020-05-30T20:35:19+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.0.1", + "version": "v2.1.2", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "144c5e51266b281231e947b51223ba14acf1a749" + "reference": "66a8f0957a3ca54e4f724e49028ab19d75a8918b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/144c5e51266b281231e947b51223ba14acf1a749", - "reference": "144c5e51266b281231e947b51223ba14acf1a749", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/66a8f0957a3ca54e4f724e49028ab19d75a8918b", + "reference": "66a8f0957a3ca54e4f724e49028ab19d75a8918b", "shasum": "" }, "require": { - "php": "^7.2.5", + "php": ">=7.2.5", "psr/container": "^1.0" }, "suggest": { @@ -5199,7 +5687,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "2.1-dev" } }, "autoload": { @@ -5231,46 +5719,147 @@ "interoperability", "standards" ], - "time": "2019-11-18T17:27:11+00:00" + "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": "2020-05-20T17:43:50+00:00" }, { - "name": "symfony/translation", - "version": "v4.4.8", + "name": "symfony/string", + "version": "v5.1.0", "source": { "type": "git", - "url": "https://github.com/symfony/translation.git", - "reference": "8272bbd2b7e220ef812eba2a2b30068a5c64b191" + "url": "https://github.com/symfony/string.git", + "reference": "90c2a5103f07feb19069379f3abdcdbacc7753a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/8272bbd2b7e220ef812eba2a2b30068a5c64b191", - "reference": "8272bbd2b7e220ef812eba2a2b30068a5c64b191", + "url": "https://api.github.com/repos/symfony/string/zipball/90c2a5103f07feb19069379f3abdcdbacc7753a9", + "reference": "90c2a5103f07feb19069379f3abdcdbacc7753a9", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", "symfony/polyfill-mbstring": "~1.0", - "symfony/translation-contracts": "^1.1.6|^2" + "symfony/polyfill-php80": "~1.15" + }, + "require-dev": { + "symfony/error-handler": "^4.4|^5.0", + "symfony/http-client": "^4.4|^5.0", + "symfony/translation-contracts": "^1.1|^2", + "symfony/var-exporter": "^4.4|^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "files": [ + "Resources/functions.php" + ], + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "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 String component", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "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": "2020-05-20T17:43:50+00:00" + }, + { + "name": "symfony/translation", + "version": "v5.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation.git", + "reference": "d387f07d4c15f9c09439cf3f13ddbe0b2c5e8be2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation/zipball/d387f07d4c15f9c09439cf3f13ddbe0b2c5e8be2", + "reference": "d387f07d4c15f9c09439cf3f13ddbe0b2c5e8be2", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "^1.15", + "symfony/translation-contracts": "^2" }, "conflict": { - "symfony/config": "<3.4", - "symfony/dependency-injection": "<3.4", - "symfony/http-kernel": "<4.4", - "symfony/yaml": "<3.4" + "symfony/config": "<4.4", + "symfony/dependency-injection": "<5.0", + "symfony/http-kernel": "<5.0", + "symfony/twig-bundle": "<5.0", + "symfony/yaml": "<4.4" }, "provide": { - "symfony/translation-implementation": "1.0" + "symfony/translation-implementation": "2.0" }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "^3.4|^4.0|^5.0", - "symfony/console": "^3.4|^4.0|^5.0", - "symfony/dependency-injection": "^3.4|^4.0|^5.0", - "symfony/finder": "~2.8|~3.0|~4.0|^5.0", - "symfony/http-kernel": "^4.4", - "symfony/intl": "^3.4|^4.0|^5.0", + "symfony/config": "^4.4|^5.0", + "symfony/console": "^4.4|^5.0", + "symfony/dependency-injection": "^5.0", + "symfony/finder": "^4.4|^5.0", + "symfony/http-kernel": "^5.0", + "symfony/intl": "^4.4|^5.0", "symfony/service-contracts": "^1.1.2|^2", - "symfony/yaml": "^3.4|^4.0|^5.0" + "symfony/yaml": "^4.4|^5.0" }, "suggest": { "psr/log-implementation": "To use logging capability in translator", @@ -5280,7 +5869,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -5321,24 +5910,24 @@ "type": "tidelift" } ], - "time": "2020-04-12T16:45:36+00:00" + "time": "2020-05-30T20:35:19+00:00" }, { "name": "symfony/translation-contracts", - "version": "v2.0.1", + "version": "v2.1.2", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "8cc682ac458d75557203b2f2f14b0b92e1c744ed" + "reference": "e5ca07c8f817f865f618aa072c2fe8e0e637340e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/8cc682ac458d75557203b2f2f14b0b92e1c744ed", - "reference": "8cc682ac458d75557203b2f2f14b0b92e1c744ed", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/e5ca07c8f817f865f618aa072c2fe8e0e637340e", + "reference": "e5ca07c8f817f865f618aa072c2fe8e0e637340e", "shasum": "" }, "require": { - "php": "^7.2.5" + "php": ">=7.2.5" }, "suggest": { "symfony/translation-implementation": "" @@ -5346,7 +5935,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "2.1-dev" } }, "autoload": { @@ -5378,36 +5967,50 @@ "interoperability", "standards" ], - "time": "2019-11-18T17:27:11+00:00" + "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": "2020-05-20T17:43:50+00:00" }, { "name": "symfony/var-dumper", - "version": "v4.4.8", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "c587e04ce5d1aa62d534a038f574d9a709e814cf" + "reference": "46a942903059b0b05e601f00eb64179e05578c0f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/c587e04ce5d1aa62d534a038f574d9a709e814cf", - "reference": "c587e04ce5d1aa62d534a038f574d9a709e814cf", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/46a942903059b0b05e601f00eb64179e05578c0f", + "reference": "46a942903059b0b05e601f00eb64179e05578c0f", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": ">=7.2.5", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php72": "~1.5" + "symfony/polyfill-php80": "^1.15" }, "conflict": { - "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0", - "symfony/console": "<3.4" + "phpunit/phpunit": "<5.4.3", + "symfony/console": "<4.4" }, "require-dev": { "ext-iconv": "*", - "symfony/console": "^3.4|^4.0|^5.0", + "symfony/console": "^4.4|^5.0", "symfony/process": "^4.4|^5.0", - "twig/twig": "^1.34|^2.4|^3.0" + "twig/twig": "^2.4|^3.0" }, "suggest": { "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", @@ -5420,7 +6023,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -5468,7 +6071,7 @@ "type": "tidelift" } ], - "time": "2020-04-12T16:14:02+00:00" + "time": "2020-05-30T20:35:19+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -5601,27 +6204,28 @@ }, { "name": "vlucas/phpdotenv", - "version": "v3.6.4", + "version": "v4.1.7", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "10d3f853fdf1f3a6b3c7ea0c4620d2f699713db5" + "reference": "db63b2ea280fdcf13c4ca392121b0b2450b51193" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/10d3f853fdf1f3a6b3c7ea0c4620d2f699713db5", - "reference": "10d3f853fdf1f3a6b3c7ea0c4620d2f699713db5", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/db63b2ea280fdcf13c4ca392121b0b2450b51193", + "reference": "db63b2ea280fdcf13c4ca392121b0b2450b51193", "shasum": "" }, "require": { - "php": "^5.4 || ^7.0 || ^8.0", - "phpoption/phpoption": "^1.5", - "symfony/polyfill-ctype": "^1.9" + "php": "^5.5.9 || ^7.0 || ^8.0", + "phpoption/phpoption": "^1.7.3", + "symfony/polyfill-ctype": "^1.16" }, "require-dev": { + "bamarni/composer-bin-plugin": "^1.4.1", "ext-filter": "*", "ext-pcre": "*", - "phpunit/phpunit": "^4.8.35 || ^5.0 || ^6.0 || ^7.0" + "phpunit/phpunit": "^4.8.35 || ^5.7.27 || ^6.5.6 || ^7.0" }, "suggest": { "ext-filter": "Required to use the boolean validator.", @@ -5630,7 +6234,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.6-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -5670,7 +6274,73 @@ "type": "tidelift" } ], - "time": "2020-05-02T13:46:13+00:00" + "time": "2020-06-07T18:25:35+00:00" + }, + { + "name": "voku/portable-ascii", + "version": "1.5.1", + "source": { + "type": "git", + "url": "https://github.com/voku/portable-ascii.git", + "reference": "e7f9bd5deff09a57318f9b900ab33a05acfcf4d3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/voku/portable-ascii/zipball/e7f9bd5deff09a57318f9b900ab33a05acfcf4d3", + "reference": "e7f9bd5deff09a57318f9b900ab33a05acfcf4d3", + "shasum": "" + }, + "require": { + "php": ">=7.0.0" + }, + "require-dev": { + "phpunit/phpunit": "~6.0 || ~7.0" + }, + "suggest": { + "ext-intl": "Use Intl for transliterator_transliterate() support" + }, + "type": "library", + "autoload": { + "psr-4": { + "voku\\": "src/voku/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Lars Moelleken", + "homepage": "http://www.moelleken.org/" + } + ], + "description": "Portable ASCII library - performance optimized (ascii) string functions for php.", + "homepage": "https://github.com/voku/portable-ascii", + "keywords": [ + "ascii", + "clean", + "php" + ], + "funding": [ + { + "url": "https://www.paypal.me/moelleken", + "type": "custom" + }, + { + "url": "https://github.com/voku", + "type": "github" + }, + { + "url": "https://www.patreon.com/voku", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/voku/portable-ascii", + "type": "tidelift" + } + ], + "time": "2020-05-26T06:40:44+00:00" } ], "packages-dev": [ @@ -6071,16 +6741,16 @@ }, { "name": "codeception/module-webdriver", - "version": "1.0.8", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/Codeception/module-webdriver.git", - "reference": "da55466876d9e73c09917f495b923395b1cdf92a" + "reference": "09c167817393090ce3dbce96027d94656b1963ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/module-webdriver/zipball/da55466876d9e73c09917f495b923395b1cdf92a", - "reference": "da55466876d9e73c09917f495b923395b1cdf92a", + "url": "https://api.github.com/repos/Codeception/module-webdriver/zipball/09c167817393090ce3dbce96027d94656b1963ce", + "reference": "09c167817393090ce3dbce96027d94656b1963ce", "shasum": "" }, "require": { @@ -6122,25 +6792,26 @@ "browser-testing", "codeception" ], - "time": "2020-04-29T13:45:52+00:00" + "time": "2020-05-31T08:47:24+00:00" }, { "name": "codeception/phpunit-wrapper", - "version": "7.8.0", + "version": "8.1.2", "source": { "type": "git", "url": "https://github.com/Codeception/phpunit-wrapper.git", - "reference": "bc847bd4f8f6d09012543e2a856f19fe4ecdcf3a" + "reference": "e610200adf75ebc1ea7cf10d7cdb43e0f5fff3cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/phpunit-wrapper/zipball/bc847bd4f8f6d09012543e2a856f19fe4ecdcf3a", - "reference": "bc847bd4f8f6d09012543e2a856f19fe4ecdcf3a", + "url": "https://api.github.com/repos/Codeception/phpunit-wrapper/zipball/e610200adf75ebc1ea7cf10d7cdb43e0f5fff3cc", + "reference": "e610200adf75ebc1ea7cf10d7cdb43e0f5fff3cc", "shasum": "" }, "require": { - "phpunit/php-code-coverage": "^6.0", - "phpunit/phpunit": "7.5.*", + "php": ">=7.2", + "phpunit/php-code-coverage": "^7.0", + "phpunit/phpunit": "^8.0", "sebastian/comparator": "^3.0", "sebastian/diff": "^3.0" }, @@ -6151,7 +6822,7 @@ "type": "library", "autoload": { "psr-4": { - "Codeception\\PHPUnit\\": "src\\" + "Codeception\\PHPUnit\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -6165,25 +6836,24 @@ } ], "description": "PHPUnit classes used by Codeception", - "time": "2019-12-23T06:55:58+00:00" + "time": "2020-04-17T18:30:51+00:00" }, { "name": "codeception/stub", - "version": "3.0.0", + "version": "3.6.1", "source": { "type": "git", "url": "https://github.com/Codeception/Stub.git", - "reference": "eea518711d736eab838c1274593c4568ec06b23d" + "reference": "a3ba01414cbee76a1bced9f9b6b169cc8d203880" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/Stub/zipball/eea518711d736eab838c1274593c4568ec06b23d", - "reference": "eea518711d736eab838c1274593c4568ec06b23d", + "url": "https://api.github.com/repos/Codeception/Stub/zipball/a3ba01414cbee76a1bced9f9b6b169cc8d203880", + "reference": "a3ba01414cbee76a1bced9f9b6b169cc8d203880", "shasum": "" }, "require": { - "codeception/phpunit-wrapper": "^6.6.1 | ^7.7.1 | ^8.0.3", - "phpunit/phpunit": ">=6.5 <9.0" + "phpunit/phpunit": "^8.4 | ^9.0" }, "type": "library", "autoload": { @@ -6196,24 +6866,24 @@ "MIT" ], "description": "Flexible Stub wrapper for PHPUnit's Mock Builder", - "time": "2019-08-10T16:20:53+00:00" + "time": "2020-02-07T18:42:28+00:00" }, { "name": "doctrine/instantiator", - "version": "1.3.0", + "version": "1.3.1", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "ae466f726242e637cebdd526a7d991b9433bacf1" + "reference": "f350df0268e904597e3bd9c4685c53e0e333feea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/ae466f726242e637cebdd526a7d991b9433bacf1", - "reference": "ae466f726242e637cebdd526a7d991b9433bacf1", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/f350df0268e904597e3bd9c4685c53e0e333feea", + "reference": "f350df0268e904597e3bd9c4685c53e0e333feea", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.1 || ^8.0" }, "require-dev": { "doctrine/coding-standard": "^6.0", @@ -6252,7 +6922,65 @@ "constructor", "instantiate" ], - "time": "2019-10-21T16:45:58+00:00" + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2020-05-29T17:27:14+00:00" + }, + { + "name": "facade/ignition-contracts", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/facade/ignition-contracts.git", + "reference": "f445db0fb86f48e205787b2592840dd9c80ded28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/facade/ignition-contracts/zipball/f445db0fb86f48e205787b2592840dd9c80ded28", + "reference": "f445db0fb86f48e205787b2592840dd9c80ded28", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Facade\\IgnitionContracts\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https://flareapp.io", + "role": "Developer" + } + ], + "description": "Solution contracts for Ignition", + "homepage": "https://github.com/facade/ignition-contracts", + "keywords": [ + "contracts", + "flare", + "ignition" + ], + "time": "2019-08-30T14:06:08+00:00" }, { "name": "filp/whoops", @@ -6365,30 +7093,33 @@ }, { "name": "mockery/mockery", - "version": "1.3.1", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "f69bbde7d7a75d6b2862d9ca8fab1cd28014b4be" + "reference": "6c6a7c533469873deacf998237e7649fc6b36223" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/f69bbde7d7a75d6b2862d9ca8fab1cd28014b4be", - "reference": "f69bbde7d7a75d6b2862d9ca8fab1cd28014b4be", + "url": "https://api.github.com/repos/mockery/mockery/zipball/6c6a7c533469873deacf998237e7649fc6b36223", + "reference": "6c6a7c533469873deacf998237e7649fc6b36223", "shasum": "" }, "require": { "hamcrest/hamcrest-php": "~2.0", "lib-pcre": ">=7.0", - "php": ">=5.6.0" + "php": "^7.3.0" + }, + "conflict": { + "phpunit/phpunit": "<8.0" }, "require-dev": { - "phpunit/phpunit": "~5.7.10|~6.5|~7.0|~8.0" + "phpunit/phpunit": "^8.0.0 || ^9.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "1.4.x-dev" } }, "autoload": { @@ -6426,7 +7157,7 @@ "test double", "testing" ], - "time": "2019-12-26T09:49:15+00:00" + "time": "2020-05-19T14:25:16+00:00" }, { "name": "myclabs/deep-copy", @@ -6478,29 +7209,35 @@ }, { "name": "nunomaduro/collision", - "version": "v2.1.1", + "version": "v4.2.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "b5feb0c0d92978ec7169232ce5d70d6da6b29f63" + "reference": "d50490417eded97be300a92cd7df7badc37a9018" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/b5feb0c0d92978ec7169232ce5d70d6da6b29f63", - "reference": "b5feb0c0d92978ec7169232ce5d70d6da6b29f63", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/d50490417eded97be300a92cd7df7badc37a9018", + "reference": "d50490417eded97be300a92cd7df7badc37a9018", "shasum": "" }, "require": { - "filp/whoops": "^2.1.4", - "jakub-onderka/php-console-highlighter": "0.3.*|0.4.*", - "php": "^7.1", - "symfony/console": "~2.8|~3.3|~4.0" + "facade/ignition-contracts": "^1.0", + "filp/whoops": "^2.4", + "php": "^7.2.5", + "symfony/console": "^5.0" }, "require-dev": { - "laravel/framework": "5.7.*", - "nunomaduro/larastan": "^0.3.0", - "phpstan/phpstan": "^0.10", - "phpunit/phpunit": "~7.3" + "facade/ignition": "^2.0", + "fideloper/proxy": "^4.2", + "friendsofphp/php-cs-fixer": "^2.16", + "fruitcake/laravel-cors": "^1.0", + "laravel/framework": "^7.0", + "laravel/tinker": "^2.0", + "nunomaduro/larastan": "^0.5", + "orchestra/testbench": "^5.0", + "phpstan/phpstan": "^0.12.3", + "phpunit/phpunit": "^8.5.1 || ^9.0" }, "type": "library", "extra": { @@ -6538,7 +7275,21 @@ "php", "symfony" ], - "time": "2018-11-21T21:40:54+00:00" + "funding": [ + { + "url": "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=66BYDWAT92N6L", + "type": "custom" + }, + { + "url": "https://github.com/nunomaduro", + "type": "github" + }, + { + "url": "https://www.patreon.com/nunomaduro", + "type": "patreon" + } + ], + "time": "2020-04-04T19:56:08+00:00" }, { "name": "phar-io/manifest", @@ -6920,40 +7671,40 @@ }, { "name": "phpunit/php-code-coverage", - "version": "6.1.4", + "version": "7.0.10", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d" + "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", - "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f1884187926fbb755a9aaf0b3836ad3165b478bf", + "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf", "shasum": "" }, "require": { "ext-dom": "*", "ext-xmlwriter": "*", - "php": "^7.1", - "phpunit/php-file-iterator": "^2.0", + "php": "^7.2", + "phpunit/php-file-iterator": "^2.0.2", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.0", + "phpunit/php-token-stream": "^3.1.1", "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^3.1 || ^4.0", + "sebastian/environment": "^4.2.2", "sebastian/version": "^2.0.1", - "theseer/tokenizer": "^1.1" + "theseer/tokenizer": "^1.1.3" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^8.2.2" }, "suggest": { - "ext-xdebug": "^2.6.0" + "ext-xdebug": "^2.7.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.1-dev" + "dev-master": "7.0-dev" } }, "autoload": { @@ -6979,7 +7730,7 @@ "testing", "xunit" ], - "time": "2018-10-31T16:06:48+00:00" + "time": "2019-11-20T13:55:58+00:00" }, { "name": "phpunit/php-file-iterator", @@ -7172,53 +7923,52 @@ }, { "name": "phpunit/phpunit", - "version": "7.5.20", + "version": "8.5.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "9467db479d1b0487c99733bb1e7944d32deded2c" + "reference": "63dda3b212a0025d380a745f91bdb4d8c985adb7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9467db479d1b0487c99733bb1e7944d32deded2c", - "reference": "9467db479d1b0487c99733bb1e7944d32deded2c", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/63dda3b212a0025d380a745f91bdb4d8c985adb7", + "reference": "63dda3b212a0025d380a745f91bdb4d8c985adb7", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.1", + "doctrine/instantiator": "^1.2.0", "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", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.9.1", + "phar-io/manifest": "^1.0.3", + "phar-io/version": "^2.0.1", + "php": "^7.2", + "phpspec/prophecy": "^1.8.1", + "phpunit/php-code-coverage": "^7.0.7", + "phpunit/php-file-iterator": "^2.0.2", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.1", - "sebastian/comparator": "^3.0", - "sebastian/diff": "^3.0", - "sebastian/environment": "^4.0", - "sebastian/exporter": "^3.1", - "sebastian/global-state": "^2.0", + "phpunit/php-timer": "^2.1.2", + "sebastian/comparator": "^3.0.2", + "sebastian/diff": "^3.0.2", + "sebastian/environment": "^4.2.2", + "sebastian/exporter": "^3.1.1", + "sebastian/global-state": "^3.0.0", "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^2.0", + "sebastian/resource-operations": "^2.0.1", + "sebastian/type": "^1.1.3", "sebastian/version": "^2.0.1" }, - "conflict": { - "phpunit/phpunit-mock-objects": "*" - }, "require-dev": { "ext-pdo": "*" }, "suggest": { "ext-soap": "*", "ext-xdebug": "*", - "phpunit/php-invoker": "^2.0" + "phpunit/php-invoker": "^2.0.0" }, "bin": [ "phpunit" @@ -7226,7 +7976,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "7.5-dev" + "dev-master": "8.5-dev" } }, "autoload": { @@ -7252,7 +8002,17 @@ "testing", "xunit" ], - "time": "2020-01-08T08:45:45+00:00" + "funding": [ + { + "url": "https://phpunit.de/donate.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-05-22T13:51:52+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -7541,23 +8301,26 @@ }, { "name": "sebastian/global-state", - "version": "2.0.0", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" + "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", + "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", "shasum": "" }, "require": { - "php": "^7.0" + "php": "^7.2", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "ext-dom": "*", + "phpunit/phpunit": "^8.0" }, "suggest": { "ext-uopz": "*" @@ -7565,7 +8328,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -7588,7 +8351,7 @@ "keywords": [ "global state" ], - "time": "2017-04-27T15:39:26+00:00" + "time": "2019-02-01T05:30:01+00:00" }, { "name": "sebastian/object-enumerator", @@ -7777,6 +8540,52 @@ "homepage": "https://www.github.com/sebastianbergmann/resource-operations", "time": "2018-10-04T04:07:39+00:00" }, + { + "name": "sebastian/type", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/3aaaa15fa71d27650d62a948be022fe3b48541a3", + "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3", + "shasum": "" + }, + "require": { + "php": "^7.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.2" + }, + "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", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "time": "2019-07-02T08:10:15+00:00" + }, { "name": "sebastian/version", "version": "2.0.1", @@ -7822,20 +8631,20 @@ }, { "name": "symfony/browser-kit", - "version": "v5.0.8", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/symfony/browser-kit.git", - "reference": "0fa03cfaf1155eedbef871eef1a64c427e624c56" + "reference": "b9adef763c4f98660d1f8b924f6d61718f8ae0bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/browser-kit/zipball/0fa03cfaf1155eedbef871eef1a64c427e624c56", - "reference": "0fa03cfaf1155eedbef871eef1a64c427e624c56", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/b9adef763c4f98660d1f8b924f6d61718f8ae0bc", + "reference": "b9adef763c4f98660d1f8b924f6d61718f8ae0bc", "shasum": "" }, "require": { - "php": "^7.2.5", + "php": ">=7.2.5", "symfony/dom-crawler": "^4.4|^5.0" }, "require-dev": { @@ -7850,7 +8659,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -7891,26 +8700,27 @@ "type": "tidelift" } ], - "time": "2020-03-30T11:42:42+00:00" + "time": "2020-05-23T13:13:03+00:00" }, { "name": "symfony/dom-crawler", - "version": "v5.0.8", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "892311d23066844a267ac1a903d8a9d79968a1a7" + "reference": "907187782c465a564f9030a0c6ace59e8821106f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/892311d23066844a267ac1a903d8a9d79968a1a7", - "reference": "892311d23066844a267ac1a903d8a9d79968a1a7", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/907187782c465a564f9030a0c6ace59e8821106f", + "reference": "907187782c465a564f9030a0c6ace59e8821106f", "shasum": "" }, "require": { - "php": "^7.2.5", + "php": ">=7.2.5", "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.0" + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "^1.15" }, "conflict": { "masterminds/html5": "<2.6" @@ -7925,7 +8735,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -7966,24 +8776,25 @@ "type": "tidelift" } ], - "time": "2020-03-30T11:42:42+00:00" + "time": "2020-05-23T13:08:13+00:00" }, { "name": "symfony/yaml", - "version": "v5.0.8", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "482fb4e710e5af3e0e78015f19aa716ad953392f" + "reference": "ea342353a3ef4f453809acc4ebc55382231d4d23" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/482fb4e710e5af3e0e78015f19aa716ad953392f", - "reference": "482fb4e710e5af3e0e78015f19aa716ad953392f", + "url": "https://api.github.com/repos/symfony/yaml/zipball/ea342353a3ef4f453809acc4ebc55382231d4d23", + "reference": "ea342353a3ef4f453809acc4ebc55382231d4d23", "shasum": "" }, "require": { - "php": "^7.2.5", + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", "symfony/polyfill-ctype": "~1.8" }, "conflict": { @@ -7995,10 +8806,13 @@ "suggest": { "symfony/console": "For validating YAML files using the lint command" }, + "bin": [ + "Resources/bin/yaml-lint" + ], "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -8039,7 +8853,7 @@ "type": "tidelift" } ], - "time": "2020-04-28T17:58:55+00:00" + "time": "2020-05-20T17:43:50+00:00" }, { "name": "theseer/tokenizer", @@ -8136,7 +8950,7 @@ "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": "^7.2.0", + "php": "^7.2.5", "ext-curl": "*", "ext-intl": "*", "ext-mbstring": "*", diff --git a/config/session.php b/config/session.php index 08b9b55d7..23ddfde9d 100755 --- a/config/session.php +++ b/config/session.php @@ -164,7 +164,7 @@ return [ | */ - 'secure' => env('SESSION_SECURE_COOKIE', false), + 'secure' => env('SESSION_SECURE_COOKIE', null), /* |-------------------------------------------------------------------------- diff --git a/packages/Webkul/Attribute/src/Database/Factories/AttributeOptionFactory.php b/packages/Webkul/Attribute/src/Database/Factories/AttributeOptionFactory.php index 2612fcc76..963717b79 100644 --- a/packages/Webkul/Attribute/src/Database/Factories/AttributeOptionFactory.php +++ b/packages/Webkul/Attribute/src/Database/Factories/AttributeOptionFactory.php @@ -30,7 +30,7 @@ $factory->define(AttributeOption::class, function (Faker $faker, array $attribut ]; }); -$factory->defineAs(AttributeOption::class, 'swatch_color', function (Faker $faker, array $attributes) { +$factory->define(AttributeOption::class, function (Faker $faker, array $attributes) { return [ 'admin_name' => $faker->word, 'sort_order' => $faker->randomDigit, @@ -43,7 +43,7 @@ $factory->defineAs(AttributeOption::class, 'swatch_color', function (Faker $fake ]; }); -$factory->defineAs(AttributeOption::class, 'swatch_image', function (Faker $faker, array $attributes) { +$factory->define(AttributeOption::class, function (Faker $faker, array $attributes) { return [ 'admin_name' => $faker->word, 'sort_order' => $faker->randomDigit, @@ -56,7 +56,7 @@ $factory->defineAs(AttributeOption::class, 'swatch_image', function (Faker $fake ]; }); -$factory->defineAs(AttributeOption::class, 'swatch_dropdown', function (Faker $faker, array $attributes) { +$factory->define(AttributeOption::class, function (Faker $faker, array $attributes) { return [ 'admin_name' => $faker->word, 'sort_order' => $faker->randomDigit, @@ -69,7 +69,7 @@ $factory->defineAs(AttributeOption::class, 'swatch_dropdown', function (Faker $f ]; }); -$factory->defineAs(AttributeOption::class, 'swatch_text', function (Faker $faker, array $attributes) { +$factory->define(AttributeOption::class, function (Faker $faker, array $attributes) { return [ 'admin_name' => $faker->word, 'sort_order' => $faker->randomDigit, diff --git a/packages/Webkul/Core/src/Exceptions/Handler.php b/packages/Webkul/Core/src/Exceptions/Handler.php index 0b89b3543..8e84fcf64 100755 --- a/packages/Webkul/Core/src/Exceptions/Handler.php +++ b/packages/Webkul/Core/src/Exceptions/Handler.php @@ -2,7 +2,7 @@ namespace Webkul\Core\Exceptions; -use Exception; +use Throwable; use Illuminate\Auth\AuthenticationException; use Doctrine\DBAL\Driver\PDOException; use Illuminate\Database\Eloquent\ModelNotFoundException; @@ -22,10 +22,10 @@ class Handler extends AppExceptionHandler * Render an exception into an HTTP response. * * @param \Illuminate\Http\Request $request - * @param \Exception $exception + * @param \Throwable $exception * @return \Illuminate\Http\Response */ - public function render($request, Exception $exception) + public function render($request, Throwable $exception) { $path = $this->isAdminUri() ? 'admin' : 'shop'; From c33d0ee7d39f5b29d49f04faa9477850f3a72d86 Mon Sep 17 00:00:00 2001 From: Pranshu Tomar Date: Tue, 9 Jun 2020 13:05:48 +0530 Subject: [PATCH 19/61] Replace array_random function to Arr:random --- .../Customer/src/Database/Factories/CustomerAddressFactory.php | 2 +- .../Webkul/Customer/src/Database/Factories/CustomerFactory.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/Webkul/Customer/src/Database/Factories/CustomerAddressFactory.php b/packages/Webkul/Customer/src/Database/Factories/CustomerAddressFactory.php index 877df08e2..1b637ac73 100644 --- a/packages/Webkul/Customer/src/Database/Factories/CustomerAddressFactory.php +++ b/packages/Webkul/Customer/src/Database/Factories/CustomerAddressFactory.php @@ -24,7 +24,7 @@ $factory->define(CustomerAddress::class, function (Faker $faker) { 'city' => $faker->city, 'postcode' => $faker->postcode, 'phone' => $faker->e164PhoneNumber, - 'default_address' => array_random([0, 1]), + 'default_address' => Arr::random([0, 1]), 'address_type' => CustomerAddress::ADDRESS_TYPE, ]; }); diff --git a/packages/Webkul/Customer/src/Database/Factories/CustomerFactory.php b/packages/Webkul/Customer/src/Database/Factories/CustomerFactory.php index 0d490948e..28789f7ef 100644 --- a/packages/Webkul/Customer/src/Database/Factories/CustomerFactory.php +++ b/packages/Webkul/Customer/src/Database/Factories/CustomerFactory.php @@ -4,6 +4,7 @@ use Faker\Generator as Faker; use Illuminate\Support\Facades\Hash; +use Illuminate\Support\Arr; use Webkul\Customer\Models\Customer; $factory->define(Customer::class, function (Faker $faker) { @@ -13,7 +14,7 @@ $factory->define(Customer::class, function (Faker $faker) { return [ 'first_name' => $faker->firstName(), 'last_name' => $faker->lastName, - 'gender' => array_random(['male', 'female', 'other']), + 'gender' => Arr::random(['male', 'female', 'other']), 'email' => $faker->email, 'status' => 1, 'password' => Hash::make($password), From 21c73ab00cca474cd1024050e4b5869b3b82b9ab Mon Sep 17 00:00:00 2001 From: Pranshu Tomar Date: Tue, 9 Jun 2020 13:15:44 +0530 Subject: [PATCH 20/61] Added Illuminate\Support\Arr class to CustomerFactory --- .../Customer/src/Database/Factories/CustomerAddressFactory.php | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/Webkul/Customer/src/Database/Factories/CustomerAddressFactory.php b/packages/Webkul/Customer/src/Database/Factories/CustomerAddressFactory.php index 1b637ac73..1aae97cd8 100644 --- a/packages/Webkul/Customer/src/Database/Factories/CustomerAddressFactory.php +++ b/packages/Webkul/Customer/src/Database/Factories/CustomerAddressFactory.php @@ -4,6 +4,7 @@ use Faker\Generator as Faker; use Webkul\Customer\Models\Customer; +use Illuminate\Support\Arr; use Webkul\Customer\Models\CustomerAddress; $factory->define(CustomerAddress::class, function (Faker $faker) { From dbc16cf7e62d676939fe3ee134b3f1223afdfd4d Mon Sep 17 00:00:00 2001 From: Annika Wolff Date: Tue, 9 Jun 2020 10:14:06 +0200 Subject: [PATCH 21/61] add logging of catched exception --- .../Http/Controllers/Shop/CartController.php | 81 +++++++++++-------- packages/Webkul/Checkout/src/Cart.php | 1 - .../src/Http/Controllers/CartController.php | 7 +- .../Http/Controllers/Shop/CartController.php | 7 +- 4 files changed, 59 insertions(+), 37 deletions(-) diff --git a/packages/Webkul/API/Http/Controllers/Shop/CartController.php b/packages/Webkul/API/Http/Controllers/Shop/CartController.php index c06644456..553b29fc7 100644 --- a/packages/Webkul/API/Http/Controllers/Shop/CartController.php +++ b/packages/Webkul/API/Http/Controllers/Shop/CartController.php @@ -2,7 +2,10 @@ namespace Webkul\API\Http\Controllers\Shop; +use Exception; +use Illuminate\Http\JsonResponse; use Illuminate\Support\Facades\Event; +use Illuminate\Support\Facades\Log; use Webkul\Checkout\Repositories\CartRepository; use Webkul\Checkout\Repositories\CartItemRepository; use Webkul\API\Http\Resources\Checkout\Cart as CartResource; @@ -42,9 +45,9 @@ class CartController extends Controller /** * Controller instance * - * @param \Webkul\Checkout\Repositories\CartRepository $cartRepository - * @param \Webkul\Checkout\Repositories\CartItemRepository $cartItemRepository - * @param \Webkul\Checkout\Repositories\WishlistRepository $wishlistRepository + * @param \Webkul\Checkout\Repositories\CartRepository $cartRepository + * @param \Webkul\Checkout\Repositories\CartItemRepository $cartItemRepository + * @param \Webkul\Checkout\Repositories\WishlistRepository $wishlistRepository */ public function __construct( CartRepository $cartRepository, @@ -69,7 +72,7 @@ class CartController extends Controller /** * Get customer cart * - * @return \Illuminate\Http\Response + * @return JsonResponse */ public function get() { @@ -86,10 +89,11 @@ class CartController extends Controller /** * Store a newly created resource in storage. * - * @param int $id - * @return \Illuminate\Http\Response + * @param int $id + * + * @return \Illuminate\Http\JsonResponse */ - public function store($id) + public function store($id): ?JsonResponse { if (request()->get('is_buy_now')) { Event::dispatch('shop.item.buy-now', $id); @@ -97,36 +101,46 @@ class CartController extends Controller Event::dispatch('checkout.cart.item.add.before', $id); - $result = Cart::addProduct($id, request()->except('_token')); + try { + $result = Cart::addProduct($id, request()->except('_token')); - if (! $result) { - $message = session()->get('warning') ?? session()->get('error'); + if (is_array($result) && isset($result['warning'])) { + return response()->json([ + 'error' => $result['warning'], + ], 400); + } + + if ($customer = auth($this->guard)->user()) { + $this->wishlistRepository->deleteWhere(['product_id' => $id, 'customer_id' => $customer->id]); + } + + Event::dispatch('checkout.cart.item.add.after', $result); + + Cart::collectTotals(); + + $cart = Cart::getCart(); return response()->json([ - 'error' => session()->get('warning'), - ], 400); + 'message' => __('shop::app.checkout.cart.item.success'), + 'data' => $cart ? new CartResource($cart) : null, + ]); + } catch (Exception $e) { + Log::error('API CartController: ' . $e->getMessage(), + ['productID' => $id, 'cartID' => cart()->getCart() ?? 0]); + + return response()->json([ + 'error' => [ + 'message' => $e->getMessage(), + 'code' => $e->getCode() + ] + ]); } - - if ($customer = auth($this->guard)->user()) { - $this->wishlistRepository->deleteWhere(['product_id' => $id, 'customer_id' => $customer->id]); - } - - Event::dispatch('checkout.cart.item.add.after', $result); - - Cart::collectTotals(); - - $cart = Cart::getCart(); - - return response()->json([ - 'message' => __('shop::app.checkout.cart.item.success'), - 'data' => $cart ? new CartResource($cart) : null, - ]); } /** * Update the specified resource in storage. * - * @return \Illuminate\Http\Response + * @return JsonResponse */ public function update() { @@ -161,7 +175,7 @@ class CartController extends Controller /** * Remove the specified resource from storage. * - * @return \Illuminate\Http\Response + * @return JsonResponse */ public function destroy() { @@ -182,8 +196,9 @@ class CartController extends Controller /** * Remove the specified resource from storage. * - * @param int $id - * @return \Illuminate\Http\Response + * @param int $id + * + * @return JsonResponse */ public function destroyItem($id) { @@ -206,7 +221,9 @@ class CartController extends Controller /** * Function to move a already added product to wishlist will run only on customer authentication. * - * @param \Webkul\Checkout\Repositories\CartItemRepository $id + * @param \Webkul\Checkout\Repositories\CartItemRepository $id + * + * @return JsonResponse */ public function moveToWishlist($id) { diff --git a/packages/Webkul/Checkout/src/Cart.php b/packages/Webkul/Checkout/src/Cart.php index 289585412..8052f6425 100755 --- a/packages/Webkul/Checkout/src/Cart.php +++ b/packages/Webkul/Checkout/src/Cart.php @@ -151,7 +151,6 @@ class Cart session()->forget('cart'); } - Log::error($cartProducts, ['product' => $product, 'cartData' => $data]); throw new Exception($cartProducts); } else { $parentCartItem = null; diff --git a/packages/Webkul/Shop/src/Http/Controllers/CartController.php b/packages/Webkul/Shop/src/Http/Controllers/CartController.php index 74b3253b9..6dc2a8d48 100755 --- a/packages/Webkul/Shop/src/Http/Controllers/CartController.php +++ b/packages/Webkul/Shop/src/Http/Controllers/CartController.php @@ -2,6 +2,7 @@ namespace Webkul\Shop\Http\Controllers; +use Illuminate\Support\Facades\Log; use Webkul\Customer\Repositories\WishlistRepository; use Webkul\Product\Repositories\ProductRepository; use Webkul\Checkout\Contracts\Cart as CartModel; @@ -75,7 +76,7 @@ class CartController extends Controller } if ($result instanceof CartModel) { - session()->flash('success', trans('shop::app.checkout.cart.item.success')); + session()->flash('success', __('shop::app.checkout.cart.item.success')); if ($customer = auth()->guard('customer')->user()) { $this->wishlistRepository->deleteWhere(['product_id' => $id, 'customer_id' => $customer->id]); @@ -88,10 +89,12 @@ class CartController extends Controller } } } catch(\Exception $e) { - session()->flash('error', trans($e->getMessage())); + session()->flash('error', __($e->getMessage())); $product = $this->productRepository->find($id); + Log::error('Shop CartController: ' . $e->getMessage(), ['productID' => $id, 'cartID' => cart()->getCart() ?? 0]); + return redirect()->route('shop.productOrCategory.index', $product->url_key); } diff --git a/packages/Webkul/Velocity/src/Http/Controllers/Shop/CartController.php b/packages/Webkul/Velocity/src/Http/Controllers/Shop/CartController.php index eafefe287..473ba897d 100644 --- a/packages/Webkul/Velocity/src/Http/Controllers/Shop/CartController.php +++ b/packages/Webkul/Velocity/src/Http/Controllers/Shop/CartController.php @@ -3,6 +3,7 @@ namespace Webkul\Velocity\Http\Controllers\Shop; use Cart; +use Illuminate\Support\Facades\Log; use Webkul\Velocity\Helpers\Helper; use Webkul\Checkout\Contracts\Cart as CartModel; use Webkul\Product\Repositories\ProductRepository; @@ -93,16 +94,18 @@ class CartController extends Controller } catch(\Exception $exception) { $product = $this->productRepository->find($id); + Log::error('Velocity CartController: ' . $exception->getMessage(), ['productID' => $id, 'cartID' => cart()->getCart() ?? 0]); + $response = [ 'status' => 'danger', - 'message' => trans($exception->getMessage()), + 'message' => __($exception->getMessage()), 'redirectionRoute' => route('shop.productOrCategory.index', $product->url_key), ]; } return $response ?? [ 'status' => 'danger', - 'message' => trans('velocity::app.error.something_went_wrong'), + 'message' => __('velocity::app.error.something_went_wrong'), ]; } From 60d71afa47bfcb0ebda979e5c14814f8d53bf68c Mon Sep 17 00:00:00 2001 From: Annika Wolff Date: Tue, 9 Jun 2020 11:22:31 +0200 Subject: [PATCH 22/61] add tickets with special prices to cart --- .../src/Helpers/EventTicket.php | 47 +++++++++++++++---- .../products/view/booking/event.blade.php | 17 ++++++- 2 files changed, 55 insertions(+), 9 deletions(-) diff --git a/packages/Webkul/BookingProduct/src/Helpers/EventTicket.php b/packages/Webkul/BookingProduct/src/Helpers/EventTicket.php index d7bda887e..cdd98dd75 100644 --- a/packages/Webkul/BookingProduct/src/Helpers/EventTicket.php +++ b/packages/Webkul/BookingProduct/src/Helpers/EventTicket.php @@ -47,10 +47,19 @@ class EventTicket extends Booking public function formatPrice($tickets) { foreach ($tickets as $index => $ticket) { + $price = $ticket->price; + + if ($this->isInSale($ticket)) { + $price = $ticket->special_price; + + $tickets[$index]['original_converted_price'] = core()->convertPrice($ticket->price); + $tickets[$index]['original_formated_price'] = core()->currency($ticket->price); + } + $tickets[$index]['id'] = $ticket->id; - $tickets[$index]['converted_price'] = core()->convertPrice($ticket->price); - $tickets[$index]['formated_price'] = $formatedPrice = core()->currency($ticket->price); - $tickets[$index]['formated_price_text'] = trans('bookingproduct::app.shop.products.per-ticket-price', ['price' => $formatedPrice]); + $tickets[$index]['converted_price'] = core()->convertPrice($price); + $tickets[$index]['formated_price'] = $formatedPrice = core()->currency($price); + $tickets[$index]['formated_price_text'] = __('bookingproduct::app.shop.products.per-ticket-price', ['price' => $formatedPrice]); } return $tickets; @@ -102,10 +111,15 @@ class EventTicket extends Booking $ticket = $bookingProduct->event_tickets()->find($product['additional']['booking']['ticket_id']); - $products[$key]['price'] += core()->convertPrice($ticket->price); - $products[$key]['base_price'] += $ticket->price; - $products[$key]['total'] += (core()->convertPrice($ticket->price) * $products[$key]['quantity']); - $products[$key]['base_total'] += ($ticket->price * $products[$key]['quantity']); + $price = $ticket->price; + if ($this->isInSale($ticket)) { + $price = $ticket->special_price; + } + + $products[$key]['price'] += core()->convertPrice($price); + $products[$key]['base_price'] += $price; + $products[$key]['total'] += (core()->convertPrice($price) * $products[$key]['quantity']); + $products[$key]['base_total'] += ($price * $products[$key]['quantity']); } return $products; @@ -131,7 +145,11 @@ class EventTicket extends Booking return true; } - $price += $ticket->price; + if ($this->isInSale($ticket)) { + $price += $ticket->special_price; + } else { + $price += $ticket->price; + } if ($price == $item->base_price) { return; @@ -145,4 +163,17 @@ class EventTicket extends Booking $item->save(); } + + /** + * Determines whether a single ticket is in Sale, i.e. has a valid sale price + * + * @return bool + */ + public function isInSale($ticket): bool + { + return $ticket->special_price !== null + && $ticket->special_price > 0.0 + && ($ticket->special_price_from === null || $ticket->special_price_from === '0000-00-00 00:00:00' || $ticket->special_price_from <= Carbon::now()) + && ($ticket->special_price_to === null || $ticket->special_price_to === '0000-00-00 00:00:00' || $ticket->special_price_to > Carbon::now()); + } } \ No newline at end of file diff --git a/packages/Webkul/BookingProduct/src/Resources/views/shop/default/products/view/booking/event.blade.php b/packages/Webkul/BookingProduct/src/Resources/views/shop/default/products/view/booking/event.blade.php index a50adda53..37a1791f8 100644 --- a/packages/Webkul/BookingProduct/src/Resources/views/shop/default/products/view/booking/event.blade.php +++ b/packages/Webkul/BookingProduct/src/Resources/views/shop/default/products/view/booking/event.blade.php @@ -25,7 +25,11 @@ @{{ ticket.name }}
-
+
+ @{{ ticket.original_formated_price }} + @{{ ticket.formated_price_text }} +
+
@{{ ticket.formated_price_text }}
@@ -62,4 +66,15 @@ + @endpush \ No newline at end of file From e88d92ed1a7d661ae0e70c5dea3846f8b8f6a7d1 Mon Sep 17 00:00:00 2001 From: Annika Wolff Date: Tue, 9 Jun 2020 14:29:27 +0200 Subject: [PATCH 23/61] add tests --- .../src/Helpers/EventTicket.php | 2 +- .../products/view/booking/event.blade.php | 17 +- tests/acceptance.suite.yml | 3 +- .../BookingProductEventTicketCest.php | 49 +++ .../BookingProductEventTicketCest.php | 358 ++++++++++++++++++ 5 files changed, 426 insertions(+), 3 deletions(-) create mode 100644 tests/acceptance/BookingProduct/BookingProductEventTicketCest.php create mode 100644 tests/unit/BookingProduct/BookingProductEventTicketCest.php diff --git a/packages/Webkul/BookingProduct/src/Helpers/EventTicket.php b/packages/Webkul/BookingProduct/src/Helpers/EventTicket.php index cdd98dd75..f1116614f 100644 --- a/packages/Webkul/BookingProduct/src/Helpers/EventTicket.php +++ b/packages/Webkul/BookingProduct/src/Helpers/EventTicket.php @@ -151,7 +151,7 @@ class EventTicket extends Booking $price += $ticket->price; } - if ($price == $item->base_price) { + if ($price === $item->base_price) { return; } diff --git a/packages/Webkul/BookingProduct/src/Resources/views/shop/velocity/products/view/booking/event.blade.php b/packages/Webkul/BookingProduct/src/Resources/views/shop/velocity/products/view/booking/event.blade.php index a50adda53..37a1791f8 100644 --- a/packages/Webkul/BookingProduct/src/Resources/views/shop/velocity/products/view/booking/event.blade.php +++ b/packages/Webkul/BookingProduct/src/Resources/views/shop/velocity/products/view/booking/event.blade.php @@ -25,7 +25,11 @@ @{{ ticket.name }}
-
+
+ @{{ ticket.original_formated_price }} + @{{ ticket.formated_price_text }} +
+
@{{ ticket.formated_price_text }}
@@ -62,4 +66,15 @@ + @endpush \ No newline at end of file diff --git a/tests/acceptance.suite.yml b/tests/acceptance.suite.yml index ba234fcea..012379ee8 100644 --- a/tests/acceptance.suite.yml +++ b/tests/acceptance.suite.yml @@ -20,10 +20,11 @@ modules: connection_timeout: 60 request_timeout: 60 log_js_errors: true - - Laravel5: + - Webkul\Core\Helpers\Laravel5Helper: part: ORM cleanup: false environment_file: .env database_seeder_class: DatabaseSeeder url: http://nginx + step_decorators: ~ \ No newline at end of file diff --git a/tests/acceptance/BookingProduct/BookingProductEventTicketCest.php b/tests/acceptance/BookingProduct/BookingProductEventTicketCest.php new file mode 100644 index 000000000..be5f61de4 --- /dev/null +++ b/tests/acceptance/BookingProduct/BookingProductEventTicketCest.php @@ -0,0 +1,49 @@ +faker = Factory::create(); + } + + public function testSpecialPricesAreShown(AcceptanceTester $I): void + { + $product = $I->haveProduct(Laravel5Helper::VIRTUAL_PRODUCT); + Product::query()->where('id', $product->id)->update(['type' => 'booking']); + + $bookingProduct = $I->have(BookingProduct::class, [ + 'type' => 'event', + 'available_to' => Carbon::now()->addMinutes($this->faker->numberBetween(2, 59))->toDateTimeString(), + 'product_id' => $product->id, + ]); + + $scenario['ticket'] = [ + 'price' => 10, + 'special_price' => 5 + ]; + + $ticket = $I->have(BookingProductEventTicket::class, array_merge( + ['booking_product_id' => $bookingProduct->id], $scenario['ticket']) + ); + + $I->amOnPage($product->url_key); + + $I->see(core()->currency($ticket->price), '//span[@class="regular-price"]'); + $I->see(__('bookingproduct::app.shop.products.per-ticket-price', ['price' => core()->currency($ticket->special_price)]), + '//span[@class="special-price"]'); + + } +} \ No newline at end of file diff --git a/tests/unit/BookingProduct/BookingProductEventTicketCest.php b/tests/unit/BookingProduct/BookingProductEventTicketCest.php new file mode 100644 index 000000000..3c7d413f7 --- /dev/null +++ b/tests/unit/BookingProduct/BookingProductEventTicketCest.php @@ -0,0 +1,358 @@ +typeHelper = app(EventTicket::class); + + $product = $I->haveProduct(Laravel5Helper::VIRTUAL_PRODUCT); + Product::query()->where('id', $product->id)->update(['type' => 'booking']); + + $availableTo = Carbon::now()->addMinutes($I->fake()->numberBetween(2, 59)); + + $this->bookingProduct = $I->have(BookingProduct::class, [ + 'type' => 'event', + 'available_to' => $availableTo->toDateTimeString(), + 'product_id' => $product->id, + ]); + } + + /** + * @param UnitTester $I + * @param Example $scenario + * + * @dataProvider getTestDataForFormatPrice + */ + public function testFormatPrice(UnitTester $I, Example $scenario): void + { + $tickets[] = $I->have(BookingProductEventTicket::class, array_merge( + ['booking_product_id' => $this->bookingProduct->id], $scenario['ticket']) + ); + + $formattedTickets = $this->typeHelper->formatPrice($tickets); + + foreach ($scenario['expectFields'] as $field) { + $I->assertEquals($scenario['expectFields']['converted_price'], $formattedTickets[0]['converted_price']); + } + + } + + /** + * @param UnitTester $I + * @param Example $scenario + * + * @dataProvider getTestDataForAddAdditionalPrices + */ + public function testAddAdditionalPrices(UnitTester $I, Example $scenario): void + { + $ticket = $I->have(BookingProductEventTicket::class, array_merge( + ['booking_product_id' => $this->bookingProduct->id], $scenario['ticket']) + ); + + $inputData = $scenario['inputData']; + $inputData['product_id'] = $this->bookingProduct->product_id; + $inputData['additional']['product_id'] = $this->bookingProduct->product_id; + $inputData['additional']['booking']['ticket_id'] = $ticket->id; + + $addTicketPrices = $this->typeHelper->addAdditionalPrices([$inputData]); + + $I->assertEquals($scenario['expected']['price'], $addTicketPrices[0]['price']); + $I->assertEquals($scenario['expected']['base_price'], $addTicketPrices[0]['base_price']); + $I->assertEquals($scenario['expected']['total'], $addTicketPrices[0]['total']); + $I->assertEquals($scenario['expected']['base_total'], $addTicketPrices[0]['base_total']); + } + + /** + * @param UnitTester $I + * @param Example $scenario + * + * @dataProvider getTestDataForValidateCartItem + */ + public function testValidateCartItem(UnitTester $I, Example $scenario): void + { + $ticket = $I->have(BookingProductEventTicket::class, array_merge( + ['booking_product_id' => $this->bookingProduct->id], $scenario['ticket']) + ); + + $product = Product::query()->find($this->bookingProduct->product_id); + + $data = [ + 'is_buy_now' => 0, + 'product_id' => $product->id, + 'quantity' => $scenario['qty'], + "booking" => [ + "qty" => [ + $ticket->id => $scenario['qty'], + ] + ] + ]; + + $cart = cart()->addProduct($product->id, $data); + $I->assertEquals('booking', $cart->items[0]->type); + + $product->getTypeInstance()->validateCartItem($cart->items[0]); + + $finalPrice = $product->price + $scenario['expected']; + $finalTotal = ($product->price + $scenario['expected']) * $scenario['qty']; + + $I->seeRecord(CartItem::class, [ + 'id' => $cart->items[0]->id, + 'price' => core()->convertPrice($finalPrice), + 'base_price' => $finalPrice, + 'total' => core()->convertPrice($finalTotal), + 'base_total' => $finalTotal, + ]); + } + + /** + * @param UnitTester $I + * @param Example $scenario + * + * @dataProvider getTestDataForHasSalePrice + */ + public function testHasSalePrice(UnitTester $I, Example $scenario): void + { + $ticket = $I->have(BookingProductEventTicket::class, array_merge( + ['booking_product_id' => $this->bookingProduct->id], $scenario['ticket']) + ); + + $I->assertEquals($scenario['expect'], $this->typeHelper->isInSale($ticket)); + } + + /* Data Providers */ + + private function getTestDataForFormatPrice(): array + { + return [ + [ + 'ticket' => ['price' => 10], + 'expectFields' => [ + 'converted_price' => 10, + 'formated_price' => '$10.00', + 'formated_price_text' => '$10.00 Per Ticket' + ] + ], + [ + 'ticket' => ['price' => 20, 'special_price' => 10], + 'expectFields' => [ + 'converted_price' => 10, + 'formated_price' => '$10.00', + 'formated_price_text' => '$10.00 Per Ticket', + 'original_converted_price' => 20, + 'original_formated_price' => '$20.00', + ] + ], + [ + 'ticket' => [ + 'price' => 20, + 'special_price' => 10, + 'special_price_from' => '0000-00-00 00:00:00', + 'special_price_to' => '0000-00-00 00:00:00', + ], + 'expectFields' => [ + 'converted_price' => 10, + 'formated_price' => '$10.00', + 'formated_price_text' => '$10.00 Per Ticket', + 'original_converted_price' => 20, + 'original_formated_price' => '$20.00', + ] + ], + [ + 'ticket' => [ + 'price' => 10, + 'special_price' => 7, + 'special_price_from' => Carbon::yesterday(), + 'special_price_to' => Carbon::now(), + ], + 'expectFields' => [ + 'converted_price' => 10, + 'formated_price' => '$10.00', + 'formated_price_text' => '$10.00 Per Ticket', + ] + ], + ]; + } + + private function getTestDataForAddAdditionalPrices(): array + { + return [ + [ + 'ticket' => ['price' => 5], + 'inputData' => [ + 'quantity' => 1, + 'price' => 10.0, + 'base_price' => 10.0, + 'total' => 10.0, + 'base_total' => 10.0, + 'additional' => [ + 'quantity' => 1, + ] + ], + 'expected' => [ + 'price' => 15.0, + 'base_price' => 15.0, + 'total' => 15.0, + 'base_total' => 15.0, + ] + ], + [ + 'ticket' => ['price' => 20, 'special_price' => 10], + 'inputData' => [ + 'quantity' => 1, + 'price' => 20.0, + 'base_price' => 20.0, + 'total' => 20.0, + 'base_total' => 20.0, + 'additional' => [ + 'quantity' => 1, + ] + ], + 'expected' => [ + 'price' => 30.0, + 'base_price' => 30.0, + 'total' => 30.0, + 'base_total' => 30.0, + ] + ], + [ + 'ticket' => ['price' => 20, 'special_price' => 10], + 'inputData' => [ + 'quantity' => 2, + 'price' => 20.0, + 'base_price' => 20.0, + 'total' => 20.0, + 'base_total' => 20.0, + 'additional' => [ + 'quantity' => 2, + ] + ], + 'expected' => [ + 'price' => 30.0, + 'base_price' => 30.0, + 'total' => 40.0, + 'base_total' => 40.0, + ] + ], + ]; + } + + private function getTestDataForValidateCartItem(): array + { + return [ + [ + 'ticket' => ['price' => 10], + 'qty' => 1, + 'expected' => 10, + ], + [ + 'ticket' => ['price' => 20, 'special_price' => 10], + 'qty' => 1, + 'expected' => 10, + ], + [ + 'ticket' => ['price' => 20, 'special_price' => 10], + 'qty' => 2, + 'expected' => 10 + ], + [ + 'ticket' => [ + 'price' => 20, + 'special_price' => 10, + 'special_price_from' => '0000-00-00 00:00:00', + 'special_price_to' => '0000-00-00 00:00:00', + ], + 'qty' => 2, + 'expected' => 10 + ], + [ + 'ticket' => [ + 'price' => 10, + 'special_price' => 7, + 'special_price_from' => Carbon::yesterday(), + 'special_price_to' => Carbon::now(), + ], + 'qty' => 2, + 'expected' => 10 + ], + ]; + } + + private function getTestDataForHasSalePrice(): array + { + return [ + [ + 'ticket' => [ + 'price' => '10.0000', + 'special_price' => null + ], + 'expect' => false + ], + [ + 'ticket' => [ + 'price' => '10.0000', + 'special_price' => '5.0000' + ], + 'expect' => true + ], + [ + 'ticket' => [ + 'price' => '10.0000', + 'special_price' => '5.0000', + 'special_price_from' => null, + 'special_price_to' => null, + ], + 'expect' => true + ], + [ + 'ticket' => [ + 'price' => '10.0000', + 'special_price' => '5.0000', + 'special_price_from' => '0000-00-00 00:00:00', + 'special_price_to' => '0000-00-00 00:00:00', + ], + 'expect' => true + ], + [ + 'ticket' => [ + 'price' => '10.0000', + 'special_price' => '5.0000', + 'special_price_from' => Carbon::yesterday(), + 'special_price_to' => Carbon::tomorrow(), + ], + 'expect' => true + ], + [ + 'ticket' => [ + 'price' => '10.0000', + 'special_price' => '5.0000', + 'special_price_from' => Carbon::yesterday(), + 'special_price_to' => Carbon::now(), + ], + 'expect' => false + ], + [ + 'ticket' => [ + 'price' => '10.0000', + 'special_price' => '5.0000', + 'special_price_from' => Carbon::now(), + 'special_price_to' => Carbon::tomorrow(), + ], + 'expect' => true + ], + ]; + } + + +} From abbd5c4a31d18d3808066c70c1043d47bff99990 Mon Sep 17 00:00:00 2001 From: Annika Wolff Date: Tue, 9 Jun 2020 14:35:02 +0200 Subject: [PATCH 24/61] slightly refactoring --- .../API/Http/Controllers/Shop/CartController.php | 12 ++++++------ .../Shop/src/Http/Controllers/CartController.php | 3 ++- .../src/Http/Controllers/Shop/CartController.php | 3 ++- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/packages/Webkul/API/Http/Controllers/Shop/CartController.php b/packages/Webkul/API/Http/Controllers/Shop/CartController.php index 553b29fc7..dbecc7c01 100644 --- a/packages/Webkul/API/Http/Controllers/Shop/CartController.php +++ b/packages/Webkul/API/Http/Controllers/Shop/CartController.php @@ -72,7 +72,7 @@ class CartController extends Controller /** * Get customer cart * - * @return JsonResponse + * @return \Illuminate\Http\JsonResponse */ public function get() { @@ -126,7 +126,7 @@ class CartController extends Controller ]); } catch (Exception $e) { Log::error('API CartController: ' . $e->getMessage(), - ['productID' => $id, 'cartID' => cart()->getCart() ?? 0]); + ['product_id' => $id, 'cart_id' => cart()->getCart() ?? 0]); return response()->json([ 'error' => [ @@ -140,7 +140,7 @@ class CartController extends Controller /** * Update the specified resource in storage. * - * @return JsonResponse + * @return \Illuminate\Http\JsonResponse */ public function update() { @@ -175,7 +175,7 @@ class CartController extends Controller /** * Remove the specified resource from storage. * - * @return JsonResponse + * @return \Illuminate\Http\JsonResponse */ public function destroy() { @@ -198,7 +198,7 @@ class CartController extends Controller * * @param int $id * - * @return JsonResponse + * @return \Illuminate\Http\JsonResponse */ public function destroyItem($id) { @@ -223,7 +223,7 @@ class CartController extends Controller * * @param \Webkul\Checkout\Repositories\CartItemRepository $id * - * @return JsonResponse + * @return \Illuminate\Http\JsonResponse */ public function moveToWishlist($id) { diff --git a/packages/Webkul/Shop/src/Http/Controllers/CartController.php b/packages/Webkul/Shop/src/Http/Controllers/CartController.php index 6dc2a8d48..d0bcb4a29 100755 --- a/packages/Webkul/Shop/src/Http/Controllers/CartController.php +++ b/packages/Webkul/Shop/src/Http/Controllers/CartController.php @@ -93,7 +93,8 @@ class CartController extends Controller $product = $this->productRepository->find($id); - Log::error('Shop CartController: ' . $e->getMessage(), ['productID' => $id, 'cartID' => cart()->getCart() ?? 0]); + Log::error('Shop CartController: ' . $e->getMessage(), + ['product_id' => $id, 'cart_id' => cart()->getCart() ?? 0]); return redirect()->route('shop.productOrCategory.index', $product->url_key); } diff --git a/packages/Webkul/Velocity/src/Http/Controllers/Shop/CartController.php b/packages/Webkul/Velocity/src/Http/Controllers/Shop/CartController.php index 473ba897d..67f0c9f26 100644 --- a/packages/Webkul/Velocity/src/Http/Controllers/Shop/CartController.php +++ b/packages/Webkul/Velocity/src/Http/Controllers/Shop/CartController.php @@ -94,7 +94,8 @@ class CartController extends Controller } catch(\Exception $exception) { $product = $this->productRepository->find($id); - Log::error('Velocity CartController: ' . $exception->getMessage(), ['productID' => $id, 'cartID' => cart()->getCart() ?? 0]); + Log::error('Velocity CartController: ' . $exception->getMessage(), + ['product_id' => $id, 'cart_id' => cart()->getCart() ?? 0]); $response = [ 'status' => 'danger', From 63c29b2c37abe4754712b189e556454f2983ba40 Mon Sep 17 00:00:00 2001 From: Annika Wolff Date: Tue, 9 Jun 2020 14:41:58 +0200 Subject: [PATCH 25/61] add special prices to event tickets --- packages/Webkul/BookingProduct/src/Resources/lang/ar/app.php | 3 +++ packages/Webkul/BookingProduct/src/Resources/lang/fa/app.php | 3 +++ packages/Webkul/BookingProduct/src/Resources/lang/it/app.php | 3 +++ packages/Webkul/BookingProduct/src/Resources/lang/nl/app.php | 3 +++ .../Webkul/BookingProduct/src/Resources/lang/pt_BR/app.php | 3 +++ 5 files changed, 15 insertions(+) diff --git a/packages/Webkul/BookingProduct/src/Resources/lang/ar/app.php b/packages/Webkul/BookingProduct/src/Resources/lang/ar/app.php index 836fd1f56..7a841de75 100644 --- a/packages/Webkul/BookingProduct/src/Resources/lang/ar/app.php +++ b/packages/Webkul/BookingProduct/src/Resources/lang/ar/app.php @@ -48,6 +48,9 @@ return [ 'price' => 'السعر', 'quantity' => 'كمية', 'description' => 'وصف', + 'special-price' => 'Special Price', + 'special-price-from' => 'Valid From', + 'special-price-to' => 'Valid Until', 'charged-per' => 'اتهم لكل', 'guest' => 'زائر', 'table' => 'الطاولة', diff --git a/packages/Webkul/BookingProduct/src/Resources/lang/fa/app.php b/packages/Webkul/BookingProduct/src/Resources/lang/fa/app.php index a504d439a..629a375ee 100644 --- a/packages/Webkul/BookingProduct/src/Resources/lang/fa/app.php +++ b/packages/Webkul/BookingProduct/src/Resources/lang/fa/app.php @@ -48,6 +48,9 @@ return [ 'price' => 'قیمت', 'quantity' => 'تعداد', 'description' => 'شرح', + 'special-price' => 'Special Price', + 'special-price-from' => 'Valid From', + 'special-price-to' => 'Valid Until', 'charged-per' => 'به اتهام در هر', 'guest' => 'مهمان', 'table' => 'جدول', diff --git a/packages/Webkul/BookingProduct/src/Resources/lang/it/app.php b/packages/Webkul/BookingProduct/src/Resources/lang/it/app.php index 924a89c5b..657b49db9 100644 --- a/packages/Webkul/BookingProduct/src/Resources/lang/it/app.php +++ b/packages/Webkul/BookingProduct/src/Resources/lang/it/app.php @@ -48,6 +48,9 @@ return [ 'price' => 'Prezzo', 'quantity' => 'Quantità', 'description' => 'Descrizione', + 'special-price' => 'Special Price', + 'special-price-from' => 'Valid From', + 'special-price-to' => 'Valid Until', 'charged-per' => 'Charged Per', 'guest' => 'Ospite', 'table' => 'Tavolo', diff --git a/packages/Webkul/BookingProduct/src/Resources/lang/nl/app.php b/packages/Webkul/BookingProduct/src/Resources/lang/nl/app.php index 59703e11a..a557dc9bf 100644 --- a/packages/Webkul/BookingProduct/src/Resources/lang/nl/app.php +++ b/packages/Webkul/BookingProduct/src/Resources/lang/nl/app.php @@ -48,6 +48,9 @@ return [ 'price' => 'Prijs', 'quantity' => 'Aantal stuks', 'description' => 'Beschrijving', + 'special-price' => 'Special Price', + 'special-price-from' => 'Valid From', + 'special-price-to' => 'Valid Until', 'charged-per' => 'In rekening gebracht per', 'guest' => 'Gast', 'table' => 'Tafel', diff --git a/packages/Webkul/BookingProduct/src/Resources/lang/pt_BR/app.php b/packages/Webkul/BookingProduct/src/Resources/lang/pt_BR/app.php index 69dfc7525..afdf84266 100755 --- a/packages/Webkul/BookingProduct/src/Resources/lang/pt_BR/app.php +++ b/packages/Webkul/BookingProduct/src/Resources/lang/pt_BR/app.php @@ -48,6 +48,9 @@ return [ 'price' => 'Preço', 'quantity' => 'Quantidade', 'description' => 'Descrição', + 'special-price' => 'Special Price', + 'special-price-from' => 'Valid From', + 'special-price-to' => 'Valid Until', 'charged-per' => 'Cobrado por', 'guest' => 'Hóspede', 'table' => 'Mesa', From 43a8f38bdc801f68d753c2055a089a0afaac0f3d Mon Sep 17 00:00:00 2001 From: Annika Wolff Date: Tue, 9 Jun 2020 14:55:06 +0200 Subject: [PATCH 26/61] adjust calendar icon position --- .../admin/catalog/products/accordians/booking/event.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking/event.blade.php b/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking/event.blade.php index 6e55e635d..c06ebdb23 100644 --- a/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking/event.blade.php +++ b/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking/event.blade.php @@ -75,7 +75,7 @@ - + @{{ errors.first(controlName + '[special_price_from]') }} @@ -96,7 +96,7 @@ - + @{{ errors.first(controlName + '[special_price_to]') }} From b8c1985beb8b9a3bf173279755050270371263e7 Mon Sep 17 00:00:00 2001 From: shivam kumar Date: Tue, 9 Jun 2020 19:22:41 +0530 Subject: [PATCH 27/61] #3197 --- .../Velocity/src/Resources/views/shop/products/view.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/products/view.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/products/view.blade.php index e8806a5a8..c7e860fad 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/products/view.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/products/view.blade.php @@ -23,7 +23,7 @@ @stop @section('seo') - meta_description : str_limit(strip_tags($product->description), 120, '') }}"/> + meta_description : \Illuminate\Support\Str::limit(strip_tags($product->description), 120, '') }}"/> From 1cc4aae067166e6c6889b9d6a315b4c57cf18552 Mon Sep 17 00:00:00 2001 From: Shubham Mehrotra Date: Tue, 9 Jun 2020 21:22:22 +0530 Subject: [PATCH 28/61] #3204 --- .../layouts/top-nav/locale-currency.blade.php | 29 +++++++++++++++---- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/layouts/top-nav/locale-currency.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/layouts/top-nav/locale-currency.blade.php index fa3937b6f..2e960ca52 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/layouts/top-nav/locale-currency.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/layouts/top-nav/locale-currency.blade.php @@ -1,5 +1,22 @@ -{!! view_render_event('bagisto.shop.layout.header.locale.before') !!} +@php + $searchQuery = request()->input(); + if ($searchQuery) { + $searchQuery = implode('&', array_map( + function ($v, $k) { + if (is_array($v)) { + return $k.'[]='.implode('&'.$k.'[]=', $v); + } else { + return $k.'='.$v; + } + }, + $searchQuery, + array_keys($searchQuery) + )); + } +@endphp + +{!! view_render_event('bagisto.shop.layout.header.locale.before') !!}