Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serializer 0.12 #402

Merged
merged 4 commits into from
Mar 17, 2013
Merged

Serializer 0.12 #402

merged 4 commits into from
Mar 17, 2013

Conversation

lsmith77
Copy link
Member

uses #382 as a basis

this is will lead to a minor BC break:

-        $view->setSerializerVersion('2.1');
-        $view->setSerializerGroups(array('data'));
+        $context = new SerializationContext();
+        $context->setVersion('2.1');
+        $context->setGroups(array('data'));
+        $view->setSerializationContext($context);

Furthermore the default version/groups will now only be applied if no SerializationContext was explicitly set.

}

$callback = $view->getSerializerCallback();
if ($callback) {
call_user_func($callback, $this, $serializer);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@schmittjoh do you think there would be any sense in keeping this callback solution to be able to configure the serializer now that we have the SerializationContext?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the serializer itself is stateless now, I think you can remove this entirely.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok good.

@beberlei
Copy link
Contributor

Wouldn't it be easy to keep it BC by offering proxy methods on $view?

@lsmith77
Copy link
Member Author

sure .. not sure that i want to maintain BC though .. i do plan to have a 1.0 stable release for 2.3 but until then i am hesitant to maintain BC.

lsmith77 added a commit that referenced this pull request Mar 17, 2013
@lsmith77 lsmith77 merged commit c334e61 into master Mar 17, 2013
@lsmith77 lsmith77 deleted the serializer-0.12 branch March 17, 2013 09:27
@HelloGrayson
Copy link

What command installs jms/serializer-bundle 0.12? I do this and get a sad error:

composer require jms/serializer-bundle
Please provide a version constraint for the jms/serializer-bundle requirement: 0.12.* 
composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package jms/serializer-bundle 0.12.* could not be found.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.

Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Installation failed, reverting composer.json to its original content.

@lsmith77
Copy link
Member Author

lsmith77 commented Apr 4, 2013

there is no tagged version yet, so did you set the minimum stability to dev?

Grayson Koonce [email protected] wrote:

What command installs jms/serializer-bundle 0.12? I do this and get a sad error:

composer require jms/serializer-bundle Please provide a version constraint for the jms/serializer-bundle requirement: 0.12.* composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages. Problem 1 - The requested package jms/serializer-bundle 0.12.* could not be found. Potential causes: - A typo in the package name - The package is not available in a stable-enough version according to your minimum-stability setting see https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion for more details. Read http://getcomposer.org/doc/articles/troubleshooting.md for further common problems. Installation failed, reverting composer.json to its original content.


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants