Safe
sanity
Our great sponsors
Safe | sanity | |
---|---|---|
7 | 93 | |
2,305 | 4,899 | |
0.8% | 1.6% | |
0.6 | 10.0 | |
5 days ago | about 22 hours ago | |
PHP | TypeScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Safe
-
PHP libraries and tools
thecodingmachine/safe: All PHP functions, rewritten to throw exceptions instead of returning false
-
Oh boy here we go again…
There are workarounds with some third party libraries, but yeah, it's a pain.
- Which inconsistences of PHP annoy you the most?
-
Any ideas about why json_encode would return empty for a request on local dev, but not empty on server?
- try not to use the built-in json_encode, as it doesnt have proper error handling. Use instead this: https://github.com/thecodingmachine/safe and Safe\json_encode()
-
Native defer & errdefer
Not what you asked for, in modern codebases it's advised to use things like https://github.com/thecodingmachine/safe
-
Use namespaced functions to replace native functions - github.com/rezen/proxyz
The goal of https://github.com/thecodingmachine/safe is different than proxyz. My goal is a method proxy that allows you to override or watch the behaviour of a function from the "global namespace" effortlessly.
-
preg_last_error() and json_last_error()
Safe-PHP redeclares all core PHP functions (in a new namespace) to throw exceptions properly. I use this on almost every project now.
sanity
- Ask HN: Freelance website builders/maintainers, what's in your 2024 toolkit?
-
Breaking Down Next.js 14
For Sanity users:
-
How to Deploy your fullstack website - My approach
Sanity is a flexible and customizable headless content management system (CMS) designed to empower developers and content creators to build digital experiences. It has a free plan which includes a hosted, real-time content database which means you don’t have to go through the stress of looking for a backend service to deploy your backend Api.
-
A list of SaaS, PaaS and IaaS offerings that have free tiers of interest to devops and infradev
Sanity.io - Platform for structured content with an open-source editing environment and a real-time hosted data store. Unlimited projects. Unlimited admin users, three non-admin users, two datasets, 500K API CDN requests, 10GB bandwidth, and 5GB assets included for free per project.
-
Integrating Sanity's Presentation Tool with Next.js: Comprehensive Guide
The world of web development is constantly evolving, with new tools and technologies emerging to optimize the content creation and management process. One such tool is the Sanity Presentation Tool, a powerful feature within the Sanity.io ecosystem designed to enhance the content editing experience. This tool bridges the gap between content management and frontend presentation, offering a seamless, real-time editing interface that is invaluable for content creators and developers alike.
-
Curious what you guys think of my company's "incentivized unlimited PTO" program.
Her new job states everyone gets 5 weeks of vacation per year. And they MUST take at least 4 weeks each year. www.sanity.io
-
Best website builder for a news website
https://strapi.io/ https://prismic.io/ https://bubble.io/ https://hygraph.com/ https://www.sanity.io/
-
Different flavors of content management
A headless one is responsible only for data management and providing an API for other applications to show this data. When talking about headless CMS, Strapi or Sanity comes to my mind first, but there are many more.
-
Can a CMS be connected to a static HTML/CSS website?
You could check out Storyblok, they have a nice free tier (most headless CMSes do) so you wouldn't have to pay for hosting. Some other good options are Prismic and Sanity Sanity.
-
Best way to keep a site up to date!
I recently started a project using sanity as a headless cms, and it was pretty easy to set up. Looking at the pricing, you might even be able to stay on the free tier for this site.
What are some alternatives?
PHP Dotenv - Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.
Strapi - 🚀 Strapi is the leading open-source headless CMS. It’s 100% JavaScript/TypeScript, fully customizable and developer-first.
Symfony VarDumper - Provides mechanisms for walking through any arbitrary PHP variable
decap-cms - A Git-based CMS for Static Site Generators
Expose - A beautiful, fully open-source, tunneling service - written in pure PHP
KeystoneJS - The most powerful headless CMS for Node.js — built with GraphQL and React
phpstan-safe-rule - A PHPStan rule to be used with the thecodingmachine/safe package
Directus - The Modern Data Stack 🐰 — Directus is an instant REST+GraphQL API and intuitive no-code data collaboration app for any SQL database.
Symfony Dotenv - Registers environment variables from a .env file
redux - A JS library for predictable global state management
Yo! Symfony TOML - A PHP parser for TOML
firecms - Awesome Firebase/Firestore-based CMS. The missing admin panel for your Firebase project!