metinbaris / inventory-bundle
Updates your Symfony apps MYSQL database with a given CSV file
Installs: 12
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/metinbaris/inventory-bundle
Requires
- php: >=8.2
- symfony/framework-bundle: 7.0.*
Requires (Dev)
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^10.5
README
Symfony bundle for inventory updates
To install this bundle inside of your symfony project run
composer require metinbaris/inventory-bundle
Update your projects .env file, these should be included
INVENTORY_MAIL={email_address_to_share_stock_info}
MAILER_DSN={smtp://your_smtp_configuration}
DATABASE_URL={mysql_connection}
Create database table stocks
php bin/console doctrine:migrations:diff
php bin/console doctrine:migrations:migrate
Copy metin_baris_routes.yaml to your routes directory or copy paste this on your routes file
metin_baris_inventory_bundle_routes:
resource: '@InventoryBundle/Controller/'
type: attribute
To upload csv, from your main symfony project root directory run
php bin/console metinbaris:read-inventory "{path_to_your_csv}/example.csv"
Be sure that Symfony Messenger worker is running for out of stock email for updates
php bin/console messenger:consume async
List of stocks route:
/index
Project Dependencies
Ensure your environment has PHP >=8.2 and the following PHP extensions and Composer packages installed:
- PHP version:
>=8.2 ext-ctypeext-iconvdoctrine/dbal:^3doctrine/doctrine-bundle:^2.11doctrine/doctrine-migrations-bundle:^3.3doctrine/orm:^3.1phpdocumentor/reflection-docblock:^5.3phpstan/phpdoc-parser:^1.26symfony/asset:7.0.*symfony/asset-mapper:7.0.*symfony/console:7.0.*symfony/doctrine-messenger:7.0.*symfony/dotenv:7.0.*symfony/expression-language:7.0.*symfony/flex:^2symfony/form:7.0.*symfony/framework-bundle:7.0.*symfony/http-client:7.0.*symfony/intl:7.0.*symfony/mailer:7.0.*symfony/mime:7.0.*symfony/monolog-bundle:^3.0symfony/notifier:7.0.*symfony/process:7.0.*symfony/property-access:7.0.*symfony/property-info:7.0.*symfony/runtime:7.0.*symfony/security-bundle:7.0.*symfony/serializer:7.0.*symfony/stimulus-bundle:^2.16symfony/string:7.0.*symfony/translation:7.0.*symfony/twig-bundle:7.0.*symfony/ux-turbo:^2.16symfony/validator:7.0.*symfony/web-link:7.0.*symfony/yaml:7.0.*twig/extra-bundle:^2.12|^3.0twig/twig:^2.12|^3.0
