Giter VIP home page Giter VIP logo

elytus-limoncello-bundle's People

Contributors

drewclauson avatar

Stargazers

 avatar

Watchers

 avatar  avatar

elytus-limoncello-bundle's Issues

Error when adding dependency to composer


  [Symfony\Component\Config\Exception\FileLoaderLoadException]                                                                                                                                                                                                                                     
  A service definition must be an array or a string starting with "@" but NULL found for service "json_api.config" in /var/www/WinStreamAPI/app/config/services.yml. Check your YAML syntax in /var/www/WinStreamAPI/app/config/services.yml (which is being imported from "/var/www/WinStreamAPI/app/config/config.yml").






  [Symfony\Component\DependencyInjection\Exception\InvalidArgumentException]                     
  A service definition must be an array or a string starting with "@" but NULL found for service "json_api.config" in /var/www/WinStreamAPI/app/config/services.yml. Check your YAML syntax.



Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-update-cmd event terminated with an exception



  [RuntimeException]
  An error occurred when executing the "'cache:clear --no-warmup'" command.


Mapping Support Doctrine Proxies

Because doctrine may have proxy objects loaded, we need to also map the corresponding Doctrine proxy object to the correct schema. Example is below on how to accomplish this. Need to integrate this into the bundle somehow?

class JsonApiConfig implements ConfigInterface
{
    public static function getConfig()
    {

        $mappings = [
            //Invoice::class =>InvoiceSchema::class,
            //Charge::class => ChargeSchema::class,
            Location::class => LocationSchema::class,
            Invoice::class => InvoiceSchema::class,
            Charge::class => ChargeSchema::class,
            Customer::class => CustomerSchema::class,
        ];

        //To support Doctrine (which could have proxy entities instead of actual entities), add the mapping for the proxy of each object just in case the object is actually a proxy
        foreach ($mappings as $key => $value) {
            $mappings['Proxies\\__CG__\\' . $key] = $value;
        }

        return [
            /*
            |--------------------------------------------------------------------------
            | Mapping between objects and their schemas
            |--------------------------------------------------------------------------
            |
            | Here you can specify what schemas should be used for object on encoding
            | to JSON API format.
            |
            | Supported schemas: as a class name, as closure.
            |
            */

            C::SCHEMAS => $mappings,
            /*
            |--------------------------------------------------------------------------
            | JSON encoding options
            |--------------------------------------------------------------------------
            |
            | Here you can specify options to be used while converting data to actual
            | JSON representation with json_encode function.
            |
            | For example if options are set to JSON_PRETTY_PRINT then returned data
            | will be nicely formatted with spaces.
            |
            | see http://php.net/manual/en/function.json-encode.php
            |
            | If this section is omitted default values will be used.
            |
            */
            C::JSON => [
                //C::JSON_OPTIONS    => JSON_PRETTY_PRINT,
                C::JSON_DEPTH => C::JSON_DEPTH_DEFAULT,
            ]
        ];
    }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.