Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

refactor to no longer use sessions in the example controller #25

Closed
3 tasks done
lsmith77 opened this issue Mar 2, 2014 · 9 comments
Closed
3 tasks done

refactor to no longer use sessions in the example controller #25

lsmith77 opened this issue Mar 2, 2014 · 9 comments

Comments

@lsmith77
Copy link
Collaborator

lsmith77 commented Mar 2, 2014

sqlite is available in all php installs, so it should be safe to use. its awkward to use session in the REST edition (https://github.com/gimler/symfony-rest-edition/blob/2.3/src/Acme/DemoBundle/Controller/NoteController.php#L55), since we should actually disable sessions entirely, since most REST apps should not use sessions.

  • refactor NoteController to no longer use sessions
  • disable sessions in the app config
  • update README.md
@lsmith77
Copy link
Collaborator Author

lsmith77 commented Mar 2, 2014

we could even drop Doctrine entirely and instead write into a file

@realityking
Copy link

Uh, sqlite is not guaranteed to be available in every installation. It has to be enabled at compile time and is in fact an optional module on Debian and Ubuntu.

That said, it's incredibly common, just make sure to require it in composer.json so there are no surprises for users.

@lsmith77 lsmith77 changed the title refactor to use sqlite instead of session refactor to no longer use sessions in the example controller Jul 31, 2014
@gimler
Copy link
Owner

gimler commented Jul 31, 2014

👎 sqlite

We can use cvs files in combination with sys_get_temp_dir what do you think?

@willdurand
Copy link
Contributor

why not using Yaml? That is what I ask my students to do first, and it works fine (most of the time).

@lsmith77
Copy link
Collaborator Author

fine for me too

@gimler
Copy link
Owner

gimler commented Jul 31, 2014

👍 for yaml better readable support for nested elements ;)

@gimler
Copy link
Owner

gimler commented Aug 16, 2014

start rewrite note storage from session to temp file see https://github.com/gimler/symfony-rest-edition/tree/remove_session

i use serialize and unserialize to keep it simple. Yaml and JSON lost class assocation.

@lsmith77
Copy link
Collaborator Author

I created #30 to make it easier to collaborate on finalizing this.

@lsmith77
Copy link
Collaborator Author

opened #33 to disable sessions

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

No branches or pull requests

4 participants