DoctrineExtensions (l3pp4rd) or EntityAudit (simplethings) - symfony

I need to implement Versionable Doctrine behavior on a Symfony 2 application.
It is really a Symfony 1 migration with Versionable behavior (Doctrine 1) already implemented.
I have found this two solution out there
DoctrineExtensions - loggable
EntityAudit
I really liked EntityAudit solution, because it is similar to Doctrine 1 Versionable behavior considering the output logged entities on db.
The point is that I think that project is not active.
Last commit was done 7 months ago. It uses some deprecated functions.
Am I right thinking that. Is there anything I am missing?

I would recommend Doctrine Extensions ...
As you already found out EntityAudit is not being maintained anymore.
Another point is DoctrineExtensions being more widely used. Though l3ppard is searching for someone to maintain the repository development is still quite active.
Therefore you will find more tutorials around the web, your updates should be less of a hassle and the chance of someone overtaking your project actually knowing what you used are higher.

If you want to use EntityAudit now (11/2017, v1.0.6), the documentation seems to be a bit out of sync, but it works, see GitHub ticket:
https://github.com/simplethings/EntityAuditBundle/issues/305#issuecomment-346630936

Related

is there any complete minecraft forge documentation anywhere?

While it doesn't appear that this is a duplicate based on my searches, I'm sure other people have complained about this in many places.
I play minecraft and know java pretty well, so I thought it would be interesting to make mods with the minecraft forge. However, most tutorials are outdated or incomplete and I can't find a complete documentation. Now, if someone says, for instance, that existing blocks can be accessed through the Blocks class, I don't know what package that class is in. My more specific question was about modifying the properties of TNT(I wanted to do this as a test mod). Based on what I've been able to scrounge from various forums, using reflection on existing blocks in the game is possible, and what I found surrounding food would suggest there is a class for TNT somewhere that can be modified to boost its power. Just so someone can explain the not-well-explained principles of forge mod making, where would I find this TNT-related class that I could use reflection on, and how would I go about doing that(I've never done stuff with reflection before)?
To be clear, I've gotten forge minecraft all set up, I don't need an explanation of that. Just how to modify the properties of TNT(and hopefully this explanation will help me understand some broader principles)
I've been using https://nekoyue.github.io/ForgeJavaDocs-NG/ for a while. It has 1.12.2, 1.13.2, 1.14.4, 1.15.2, 1.16.5 and 1.17.1
I've been looking for a complete documentation/tutorial too, and I haven't fount a lot of stuff to be clear, but I found a wiki that might be useful. Here it is if you want to check it out:
Mcjty's wiki: https://wiki.mcjty.eu/modding/index.php?title=Main_Page
Forge's official documentation can be found here, versions:
1.15.x
1.16.x
1.17.x

Xunit - Moq - Autofixture changes.. are the removed features coming back?

It seems that Xunit no longer supports extending TraitAttributes. They have sealed the class.
There are also some other issues with Autofixture's plugin for AutoData() where we can inject random created data through an attribute. There are a few work around's for this, however I am attempting to evaluate this for a larger product overall. I liked the demo's since they could do small things like SQL, Excel, custom Attributes for category.
It seems there was more functionality before the changes. I have looked at the site and still see some of the features are returning and there isn't much information.
Is there a new set of functionality coming out? Or possibly a change that will allow us to recreate the older functionality in a new way? It seems the SQL and Excel have a work around, however I can't find any information about when the latest version will be compatible with "Autofixture with xUnit.net data theories" Nuget package. I really like what I have seen, though I can say I don't like breaking changes when I look at enterprise solutions. I cringe a little when I think about if I had this in place in an enterprise and I had made a lot of custom attributes, or used Moq and Autofixture to populate and now all my tests were broken. So I guess the other question is, does Xunit seem to change a lot with breaking changes? There is the other option of moving Xunit back a version. Though at some point I would need to know if these things would be fixed or if they were permanently removed, since I wouldn't want to spend time using functionality that is being removed.
Another is AutoFixtureMoqAutoDataAttribute that doesn't load without that side Nuget package. With the side nuget packages not being updated.
I guess the end question may be.. Does anyone know of any plans to get these features to work with the current version of xunit so that I can start implementing and then expect to do mass replaces later? Or are these permanently breaking changes where we shouldn't implement anything that is currently missing.
Thank you in advance.
Short answer
If you want to use xUnit.net 1.x with AutoFixture, use AutoFixture.Xunit.
If you want to use xUnit.net 2.x with AutoFixture, use AutoFixture.Xunit2.
Explanation
xUnit.net 2.0 introduced breaking changes, compared to xUnit.net 1.x (e.g. 1.9.2). For AutoFixture, we wanted to make sure that AutoFixture supports both. There are people who want to upgrade to xUnit.net 2.x as soon as possible, but there are also people who, for various reasons, will need to stay with xUnit.net 1.x for a while longer.
For the people who wanted or needed to stay with xUnit.net 1.x for the time being, we wanted to make sure that they'd still get all the benefits of various bug fixes and new features for the AutoFixture core, so we're maintaining two parallel (but feature complete) Glue Libraries for AutoFixture and xUnit.net.
As an example, we've just released AutoFixture 3.30.3, which addresses a defect in AutoFixture itself. This bug fix thus becomes available for both xUnit.net 1.x and 2.x users.
Thus, when you need to migrate from xUnit.net 1.x to xUnit.net 2.x, you should uninstall AutoFixture.Xunit and instead install AutoFixture.Xunit2. As far as I know, there should be feature parity between the two.
Traits
AutoFixture.Xunit and AutoFixture.Xunit2 don't use the [Trait] attribute, so I don't know exactly what you have in mind regarding this.
AutoMoq
Again, when it comes to AutoFixture.AutoMoq, it doesn't depend on xUnit.net, so I don't understand the question here as well. It sounds like a separate concern, so you may want to consider asking a separate question.

FOSUserBundle: what is the point? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
I've seen many people trying to use FOSUserBundle.
I've been struggling with it for 6 hours now. Just to be able to make a custom user registration form.
The basic documentation is 6 pages long: basic.
Here are all the drawbacks of using FOSUserBundle, from my point of view:
you have to copy paste their views to make inheritance possible
they have their own table on the database: fos_user. So you have to base all your code on your user entity, which a child of BaseUser. If your database follows a convention (like wordpress does, with all tables beginning with wp_) this breaks your convention.
you have to hack all you own views with things like "if the fos_user_content block is empty i suppose there's nothing to display, otherwise i have to re-organize my whole view to display the fos_user_content block (registration, modify user profile and so on)"
and now I see that if you need two different registration forms (for example, one for client, one for partners) it's not possible unless you hack. See here.
So I'm just wondering: what is the point of using if FOSUserBundle?
If I've already done a registration process that follows the very basic things explained in Symfony help (forms, form validation, and sessions) and I just copy paste my code, this is, from my point of view, far faster than installing, configuring, inheriting, modifying and so on the FOSUserBundle.
Knowing what I've done, what are the advantages of FOSUserBundle? What could make me change and take some more hours to make it work with my project, instead of re-using my (forms, form validation, and sessions) from another project?
Well, your question sounds more like a rant, but you got some points.
In my opinion, the main problem of the FOSUserBundle as well as a lot of Bundle in the community, is that they try to make it customizable, generic, re-usable, whatever.
The goal is fair, but in reality it often leads to not human friendly code. Most of the time, you will take much more time to "get it done" using community bundle than making your own (see Sonata bundles).
I don't say they are bad bundles, not at all, but they deserve different purposes.
For me such bundles may help newcomers to have a quick implementation, to get things done, and in the case of a Rapid Application Development, it may be really easy to get a fully working application with all the registration process done.
But most of the time, you realize that using third party codes ties you too much to their own concept and that is wrong.
In comparison, I do like very much the npm community, there are A LOT of little package with one function which you can easily integrate, in the same way, I try, to favor library instead of bundle when I want to release an open source project. The point is the framework implementation is free of any concept or philosophy and easily integrate in an existing project.
I remember some early days where I had to play with Joomla, Drupal, Wordpress, whatever, it was the "plugin/extension/module" fashion, in the same way that we often hear "there is a bundle for that", some people, or company just want to get it done, no matter the quality, the future of the application because it already have been sold.
To conclude, such bundles can greatly help and speed up development process, but be careful, if you have custom requirements, performance implication, etc. don't use them, however if you only want to a quick proof of concept, or a simple application, it is worth.
This is a fiction story based on my own experience and failures using it :)
I know this is an old post but as search engines keep indexing this...
FYI FOSUserBundle has been discontinued and is of no use in Symfony 4 and 5...
Sources
No Longer Maintained Message On Documentation #2874
Is this project maintained? #2996
Comment with alternatives by Caedendi on 10 Jan 2020

MySql's Connector/Net with MVC 3

I'd like to get some information regarding using MySQL alongside ASP.NET (particularly MVC 3). From what I've found and experienced, it doesn't quite seem as customizable in terms of the Membership and User classes which come with Asp.Net, especially when it comes to validation or registration.
For example, after configuring my web.config file to use MySQL, I found myself realizing that, although a fair amount of tables were auto-generated for me to use, I wasn't able to change the names of them. Because of this, it seemed as though if I were to change a column name, or add a column to the table, it wouldn't quite work with the system, since everything has been pre-built.
Yet, with ADO.Net/Entity Framework, it appears that I might actually be able to have more freedom in how I go about creating my websites using MsSQL. Is this true? Is MySQL just not meant for ASP.Net, despite the the fact that you can install and use it at your leisure. Or is it that it just requires more work to get everything working, and you kind of have to reinvent the wheel by creating your own database classes and validation tools?
I'm not trying to bash either MySql or MsSql, I'm simply looking for a good analysis on the topic, as Google hasn't helped me much in this area.
This is more an issue with the default providers, and one of the many reasons why the 1st thing I did when I learnt about them was to try and make my own. (To be clear, creating your own one from scratch does require a fair amount of work, there are a few good tutorials out there that can give you a quick start)
[It'd make all our lives easier if the .Net framework used Interfaces for the providers rather than the base class... ]
To be clear, the big thing with the auto generated providers is the sprocs they use require the specified names, if you want to change the table names then you'll have to also update all the Sprocs as well. (This is true for any custom provider you may chose to build/use)

Mapping of bundle names onto respective directory path in Symfony2

I'm not sure how to put that question. It's a bit fuzzy, but if you encountered the Corpus Delicti, you'll know what I mean.
When I first came across how Symfony2 maps bundles onto paths, few days ago, I already felt bit puzzled about why they chose to map a Bundle name of
AxxBxxBundle onto .../Axx/BxxBundle/...
To me this decision seems arbitrary and confusing, don't get me wrong this is not a serious obstacle and you get used to it within five minutes, but still I think it smells funny.
Now I just came across this quote in the Book:
BundleName:ControllerName:TemplateName
This is the logical name of the template, which is mapped to a
physical location using the following convention.
/path/to/BundleName/Resources/views/ControllerName/TemplateName
And this is wrong I think, there would have to be slash between Bundle and Name.
But this quote shows me that even in the inner Symfony2 circle some people don't find that intuitive.
So what is the "philosophy" bind this bundle thing and its mapping logic?
This doesn't exactly answer the question about the reasoning, but it provides some more information on the Bundle-topic. To get an answer on the why, you should perhaps contact Fabien Potencier who wrote the Symfony\Component\HttpKernel\Kernel class which relies on this convention.
Coming from Zend Framework, it's not that bad for me. All those classes start with Zend_ Thinking of it as the owner/creater's name makes it easier. In java most libraries start with com.foobar
Quoting Fabien: "Symfony2 relies on well-know design patterns, and best practices coming from the Java world."
Your statement does not really make sense or I'm missing your point:
And this is wrong I think, there would have to be slash between Bundle
and Name.
Did you mean: Between Acme and DemoBundle? It does feel like a duplication, but
Quoting Fabien: "A bundle is a structured set of files that implements a single feature and can be easily shared with other developers."
I can use a blog bundle from Acme, then I find a similar bundle from Emca. Most likely their bundles will have the same model&controller&route names. Using them both: this way nothing gets overridden using another library. So the first name for the creator/owner is to prevent duplication.
Since it's a pain to use, I always call mine My/DemoBundle for quicker use :p Or you can give it a custom name during the console bundle generation (if you don't like it)
Also:
All core bundles are treated the exact same as your bundles and
everything is a bundle. Bundles are easily portable and configurable.
They are really the key to Symfony2’s real power. A bundle can extend
another bundle. It can be distributed independently from it’s
application.
Since the web assets are in the bundle, I believe they managed to get it right. That will allow easy configuration and reusability, e.g. bigger (scope) improvements can be made to the symfony core without effecting your app.

Resources