Here's the story: I have moved to a new job 3 months ago. The development team consists of 5-6 people, with one lead developer. All of the projects here are "one-man-jobs", there are no tasks requiring teamwork, everyone works on their own.
Management wants us to use an in-house framework, so that the projects where there will be more than one people are involved, can go more fluently. One person was tasked with writing the framework himself a few months ago, and now I have been given the task to use this framework from now on.
Much to my horror the code is filled with eval()s, call_user_func()s, silencing operators (@), global state is all over the system through static methods, public fields, global variables, and singletons. The classes all begin with the same prefix (the FW's name), thus killing code-completion, and all the classes' filenames begin with 'class.', making it even more impossible to use automatic completion. The classes are basically used for namespacing purposes, with no sign of polymorphism and encapsulation. Lots of already provided functionality are reinvented, like file locking, and session handling.
I have strongly rejected using it. We have agreed to have a discussion about why this is bad, and what can we do to make it better. Beside me, two other people were on the meeting, the lead developer, and the colleague who wrote the existing framework.
I was pretty much devastated after that meeting. I have tried making solid arguments, and giving examples why things are bad, and how they should be done, to make it more safe, reusable, and maintainable. They sprung back like pingpong balls. One argument against using private variables, and getting rid of global state, was that we can easily "gunge in" (is that the correct word?) changes at the last minute, which is harder to do with proper encapsulation. They didn't understand why I want to get rid of the @ operator, that it silences everything, not just php's default error displaying, and it will be almost impossible to find bugs, if they happen in a @function, and they should handle errors, not silence them. One of them agreed with me, that yes, we should handle errors, but this is a small thing, and there are errors that you cannot expect. I agreed on the last part, and told them that yes, that is why you disable error reporting. They didn't understand why I would want to disable that, because then you won't see any errors. In fear, I asked if they have error reporting turned on, on production servers, and a very confident and resounding, "yes!" was the answer.
I didn't know how to argue after this, I proposed the idea of coming up with some made up task, and everyone should solve it in their own way, and then give a presentation about how, and why they did it, so maybe we can demonstrate our opinions more easily. Everyone agreed. The task we came up with is a very very simple CRUD task. After 30 minutes I realized that I have just given a death sentence to myself. For a very simple task like this, using a full-blown MVC system is overkill, the other guy will use the framework in question, and solve the problem with 5 classes, whereas I will use ~20 or something, since much of MVC's strength lies in separation, scalability, and maintainability. If I try to reason for unit testing, dependency injection, loose coupling, they will think I'm a bozo.
I have proposed using a freely available framework, such as Zend Framework, since it's already written, tested, used, whatnot. The idea wasn't exactly shot down, but the lead developer didn't like it, since it's hard to extend the functionality of already existing frameworks. I'm not sure how much of this is true, I have only used ZF for a month, I don't consider myself proficient enough in it, to vote harder for it.
A little background: I already have a pretty successful project behind me, it was on a very short deadline so I had the option of using my own stuff, so I'm not completely seen as the "random smartass from streets", but I haven't earned too much respect yet either.
How would you go about solving this situation?