Giter Club home page Giter Club logo

timezonebundle's Introduction

TimezoneBundle

The TimezoneBundle adds support for guessing a appropiate Timezone serverside in your Symfony 2.1 application.

Latest Stable Version Build Status Scrutinizer Code Quality Code Coverage

Latest Unstable Version Total Downloads License

About

This Bundle offers Timezone detection via a Kernel-listener. Also included is a TimezoneValidator.

Included are 3 TimezoneGuessers

  • geoip
  • locale_mapper
  • locale

You can define the order of which guesser should be called first. Once a guesser finds a appropiate timezone, the timezone will be stored in the session variable lunetics_timezone.

Requirements

To use the geoip guesser and the locale guesser, the pecl-geoip extension must be installed and working.

Documentation

Read the Documentation

Installation

Read the Documentation

License

This bundle is under the MIT license.

Authors

Matthias Breddin : @lunetics

timezonebundle's People

Contributors

erivello avatar eymengunay avatar hugomn avatar ifdattic avatar lunetics avatar t0k4rt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

timezonebundle's Issues

Not Working as of Symfony 2.5

Hi there,

somethin in the Validator class of Symfony changed.

in TimezoneListener I get the following error:
[Mon Apr 28 23:08:33.097997 2014] [:error] [pid 27930] [client 127.0.0.1:35576] PHP Catchable fatal error: Argument 4 passed to Lunetics\TimezoneBundle\EventListener\TimezoneListener::__construct() must be an instance of Symfony\Component\Validator\Validator, instance of Symfony\Component\Validator\Validator\LegacyValidator given, called in .../app/cache/prod/appProdProjectContainer.php on line 1521 and defined in .../vendor/lunetics/timezone-bundle/Lunetics/TimezoneBundle/EventListener/TimezoneListener.php on line 49

If I just remove the Constraint for the Parameter it works.

Symfony3

I have a following warning in my depreciation tab:
The Symfony\Component\Validator\Validator\RecursiveValidator::validateValue method is deprecated in version 2.5 and will be removed in version 3.0. Use the Symfony\Component\Validator\Validator\ValidatorInterface::validate method instead.

Last lines of stack trace:

RecursiveValidator::validateValue() (called from TimezoneProvider.php at line 53)
TimezoneProvider::setTimezone() (called from TimezoneListener.php at line 121)

Symfony 2.5 BC break: Validator class

Hi,

after upgrading to Symfony 2.5.0, I get the following error:

Catchable Fatal Error: Argument 4 passed to Lunetics\TimezoneBundle\EventListener\TimezoneListener::__construct() must be an instance of Symfony\Component\Validator\Validator, instance of Symfony\Component\Validator\Validator\LegacyValidator given

This is because @validator service returns LegacyValidator class.

I see that master branch already uses ValidatorInterface in this constructor. Could you please create a new tag with fixed version? 2.1.1 branch has this bug.

Thank you

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.