Download the PHP package misatotremor/csv-bundle without Composer

On this page you can find all versions of the php package misatotremor/csv-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package csv-bundle

AvroCsvBundle Build Status codecov

This bundle provides an easy way to upload data to your db using csv files with just a few configuration parameters.

This is a fork of jdewits original code.

Status

This bundle is under development and may break.

Limitations

This bundle uses php and Doctrine and is not your best bet for importing gargantuan csv files. Use your databases native importing & exporting solutions to skin that cat.

Features

Supports

Installation

This bundle is listed on packagist.

Download the bundle

Enable the bundle as well as the dependent AvroCaseBundle:

Configuration

Add this required config

Add routes to your config

Add the entities/documents you want to implement importing/exporting for

To exclude certain fields from being mapped, use the ImportExclude annotation like so.

Since PHP 8 you can also use it as an attribute like this

Importing

Implement importing for as many entities/documents as you like. All you have to do is add them to the objects node as mentioned previously.

Then just include a link to specific import page like so:

Replace "client" with whatever alias you called your entity/document in the config.

Views

The bundle comes with some basic twitter bootstrap views that you can override by extending the bundle.

Association mapping

An event is fired when importing an association field to allow implementing your own logic fitting

Just create a custom listener in your app that listens for the AssociationFieldEvent::class event.

A simple implementation getting an associated entity by name could look like:

Customizing each row

Want to customize certain fields on each row? No problem.

An event is fired when a row is added that you can tap into to customize each row of data.

Just create a custom listener in your app that listens for the RowAddedEvent::class event.

For example...

Register your listener or use autowiring

Exporting

This bundle provides some simple exporting functionality.

Navigating to "/export/your-alias" will export all of your data to a csv and allow you to download it from the browser.

You can customize the export query builder and the exported data by listening to the corresponding events (See events in the Avro\CsvBundle\Event namespace).

If you want to customize data returned, just create your own controller action and grab the queryBuilder from the exporter and add your constraints before calling "getContent()".

Ex.

Register your controller or use your already setup autowiring

To Do:

Acknowledgements

Thanks to jwage's EasyCSV for some ground work.

Feedback and pull requests are much appreciated!


All versions of csv-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.0
ext-json Version *
misatotremor/case-bundle Version ^1.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package misatotremor/csv-bundle contains the following files

Loading the files please wait ....