❌

Reading view

I built AmunCode Config — a lightweight configuration and environment-loading library for PHP

Hey everyone!

I've been working on a small PHP library called AmunCode Config, and I'm sharing its first stable release.

The idea is simple: provide a lightweight, framework-independent way to load environment variables, load PHP configuration files, and access configuration values without introducing a large framework or unnecessary abstractions.

What does it provide?

The package currently has four main classes:

  • EnvironmentLoader — loads .env files using PHP dotenv, with optional or required file loading.
  • Env — retrieves environment variables from $_ENV, $_SERVER, and getenv(), with automatic value normalization.
  • ConfigurationLoader — discovers and loads PHP configuration files from a directory.
  • Config — provides dot-notation access to configuration values, including retrieving, updating, and recursively merging configuration arrays.

A quick example

use AmunCode\Config\Config; use AmunCode\Config\EnvironmentLoader; // Load environment variables. $environment = new EnvironmentLoader(); $environment->load($root); // Load PHP configuration files. $config = new Config($root . '/config'); // Retrieve configuration values. $appName = $config->get('app.name', 'My Application'); $dbHost = $config->get('database.host'); // Update configuration. $config->set('app.debug', true); 

A few design decisions:

  • Environment loading and configuration loading are separate operations.
  • Environment variables are not overwritten by .env values when already defined.
  • Empty environment values are preserved rather than silently replaced by defaults.
  • The package doesn't automatically define a global env() helper.

Technical details

  • PHP 8.4.1+
  • Symfony Finder
  • PHP dotenv
  • Composer package
  • MIT License
  • PHPUnit tests and GitHub Actions CI

Installation

composer require amuncode/config 

Source code: https://github.com/AmunCode-OSS/Config

Documentation and usage examples are available in the repository README.

I'd appreciate feedback from other PHP developers, particularly on the API design, class responsibilities, and whether anything important is missing or could be simpler.

Thanks for taking a look!

submitted by /u/AmunCode to r/PHP
[link] [comments]
  •  

A CMS built on top of a blogging platform.

Seasoned developer here, new to Wordpress. While there is lots to like with Wordpress, and the FSE environment, some of the architectural decisions baffle me.

  1. While I understand the need for backward compatibility, mangling the "wp-posts" database table to contain everything under the sun, many of which are not "posts" at all, is clumsy at best.

  2. Storing pages/scripts/stylesheets/etc in the database (yes the "posts" table), means a developer cannot reasonably use a source code control system like git to manage source code - an absolute requirement when bugs are introduced and things need to be backed out.

  3. On top of these issues, every version of every page/script/stylesheet is stored in the database. Not in a way that you can easily revert back to a known/tagged version, but in a way that just bloats the database in a way that you are only using a small fraction of it at runtime, the rest is just dead baggage.

submitted by /u/GullibleInitiative75 to r/Wordpress
[link] [comments]
  •  

No les parece que la comunidad de running es de las más fuertes en la City?

No les parece que la comunidad de running es de las más fuertes en la City?

En ciudad de Panamá es muy fácil y accesible pertenecer a una comunidad de running, los eventos están por todos lados y la variedad de carreras lo hace aún más interesante. Algún runner que lo valide ?

submitted by /u/Master-Led-Events to r/Panama
[link] [comments]
  •  

Mexico's Senate Approves ISP Rules To Disconnect Persistent Online Pirates

An anonymous reader quotes a report from TorrentFreak: On Tuesday, Mexico's Senate approved (PDF) a reform of the Federal Copyright Law that ties ISP liability to having a policy to terminate repeat infringers. [This policy has to be published permanently on their website and in their terms of service, and it must include a basic way to notify users. In other words, what can be terminated is the Internet connection itself, not just an account. According to Mexican business outlet EL CEO, this means that access providers such as Telmex and Izzi will need such a policy.] The Senate approved the amendments with roughly two-thirds of the vote, as the opposition voted against. The Chamber of Deputies already approved the same text in October, so the decree now goes to President Claudia Sheinbaum. Her government proposed the changes in May to bring the law in line with the USMCA trade agreement between Mexico, the United States and Canada. [...] Providers that don't comply risk facing liability. Under the new rules, any ISP that fails to meet its safe harbor conditions becomes liable for its users' infringements if it knowingly contributes to, induces, or causes the infringement. The same goes for an ISP that can control the infringing user and profits directly from the infringement. In both cases, the Mexican Institute of Industrial Property (IMPI) can fine the provider up to roughly 4.7 million pesos (~$250,000), depending on the infringement. The law doesn't explicitly define the term repeat infringer, nor does it say how many piracy accusations it takes before a subscriber can be cut off. According to Aurora Lopez-Portillo, director of legal services at IP firm ClarkeModet, each provider has to decide its own threshold. She told EL CEO that ISPs should also check whether the accusations actually hold up, while giving users a chance to respond, even though the law doesn't require that. During Tuesday's Senate debate, some lawmakers in the opposition raised similar concerns. Senator Gabriel Elizondo warned that families can share a single connection, so the pirating activities of one person could leave an entire household offline. Previously, opposition lawmakers proposed requiring a court order before Internet service could be suspended, but that proposal was not adopted. [...] There, failing to meet the safe harbor conditions, including the repeat infringer policy, is the first requirement for liability. If an ISP also contributes to infringement with knowledge of it, or can control the infringer and directly profits from it, it can be held responsible. The new repeat infringer rules will take effect 180 days after their publication in Mexico's official gazette, which hasn't happened yet as far as we can see. How Mexican ISPs will define a repeat infringer, and how many accusations it takes, has yet to be seen.

Read more of this story at Slashdot.

  •  

Built an embeddable, zero-dependency DevTools overlay for React & Next.js to inspect fetch requests and browser storage in-app

Hey r/reactjs!

I got tired of constantly opening browser DevTools, filtering out noisy browser extensions, and switching between tabs just to check local storage or quick fetch responses during local development.

To solve this, I built React Dev Companion — a lightweight, zero-dependency developer tools overlay that embeds directly into your React / Next.js application UI.

💡 Key Features:

  • Real-Time Network Interception: Intercepts native window.fetch non-invasively to capture HTTP methods, endpoints, and status codes.
  • Storage Inspector: Switch between localStorage, sessionStorage, and cookies to view, inject, or delete keys in real-time.
  • Zero Extra Dependencies: Designed to keep bundle overhead minimal.
  • Dev-Only Friendly: Easy to mount conditionally (e.g., inside Next.js Root Layout or Vite main component).

🔍 Quick Example (Next.js App Router):

```tsx 'use client'; import { DevCompanion } from 'react-dev-companion';

export default function RootLayout({ children }: { children: React.ReactNode }) { return ( <html lang="en"> <body> {children} {process.env.NODE_ENV === 'development' && <DevCompanion />} </body> </html> ); } ```

We set up a strict CI/CD pipeline using GitHub Actions, TypeScript, Conventional Commits, and Husky to keep the codebase clean.

🐙 GitHub Repository: https://github.com/Kickz1nn/react-dev-companion
📖 Dev.to Article: https://dev.to/kickz1nn/building-an-embeddable-zero-dependency-devtools-panel-for-react-nextjs-3ic6

I'd love to hear your thoughts, feedback, or any features you'd like to see added next!

submitted by /u/Kickz1nn to r/reactjs
[link] [comments]
  •  

Open-sourced the core of my React desktop app: local SQLite, Node server inside a Tauri shell, Ollama assistant. Free download.

Burrow is a personal-data desktop app (budget, journal, todos, habits, notes). The stack is a Vite and React frontend, a Node server that owns a single SQLite database, and a Tauri shell that packages the two into a Windows installer for x64 and ARM64.

Things in the repo that might interest React devs:

- A hard JavaScript bundle budget enforced in CI, with the number pinned in a test so it cannot creep.

- Visual regression baselines regenerated on a side branch in CI rather than committed from dev machines.

- Modules are isolated under src/modules and server/modules with a small shared envelope for API errors.

- The assistant UI streams from a local Ollama server, so no API keys anywhere in the app.

It went free this week and the core is AGPL. Links in the comments.

submitted by /u/Revibed69 to r/reactjs
[link] [comments]
  •  

EU Says TikTok's 'Rabbit Hole' Effect Must Stop

The European Commission has preliminarily found that TikTok violates the Digital Services Act because its For You recommendation algorithm can create a "rabbit hole effect," repeatedly exposing users to potentially harmful content involving topics such as sadness, isolation and body image. TikTok must change the feed's design or potentially face fines of up to 6% of its global annual revenue. The Verge reports: The findings come months after the EU Commission declared that TikTok's design is too "addictive." While TikTok has implemented controls to mitigate the algorithm's "rabbit hole effect," the Commission says its preliminary findings suggest that they're not effective. TikTok must now change the design of its For You feed, or else face fines of up to 6 percent of its global annual turnover. The platform is also facing pressure in the US, with lawmakers and a wave of lawsuits raising concerns about child safety. "Every time a user scrolls or likes a video on TikTok, the algorithm serves more of the same leading users down rabbit holes they cannot easily escape from," Henna Virkkunen, the EU Commission's executive vice president of tech sovereignty, security, and democracy, says in the press release. "Today's preliminary findings show again that TikTok needs to step up its efforts to protect users' well-being, including those of minors."

Read more of this story at Slashdot.

  •  

Where can I find cool design inspirations?

Hey everyone!

I'm looking for any websites or discussion forums that talk about design patterns, or really any cool features for web development. Etc, manipulating CSS in interesting ways to get cool designs, interesting things you can do with JavaScript etc..

I'm a bit tired of looking at AI responses and would love to hear if there's anything out there!

submitted by /u/International-Cap-13 to r/webdev
[link] [comments]
  •  

Showoff Saturday: a SQL parser in TypeScript's type system, so queries get typed with no codegen

TypeSQL type-checks SQL strings in TypeScript. The compiler parses the SQL itself and checks it against your schema type, so there are no generated files, no build step and no database connection.

// rows is { email: string; title: string | null }[] // The LEFT JOIN makes title nullable. const rows = await sql( `SELECT u.email, p.title FROM users u LEFT JOIN posts p ON p.author_id = u.id WHERE u.id = ${sql.param(userId)}`, ).execute(); // Compile error: column "emial" does not exist. Perhaps you meant the column "email"? sql("SELECT emial FROM users"); 

It supports PostgreSQL, SQLite, MySQL and MariaDB, and the runtime is under 3 kB with no dependencies. The main catch is that it needs TypeScript 7.1 or later (7.1.0-beta works), and very large queries can hit the compiler's limits (workaround-able using sql.as<>())

I used AI coding to build this. To keep the output honest, each bug fix gets a permanent test project, and the 100+ scenario tests run against real PostgreSQL, MySQL and MariaDB servers. I will try to keep it non-slop.

GitHub: https://github.com/ismailkarsli/TypeSQL Docs: https://typesql.karsli.net

submitted by /u/ismail5412 to r/webdev
[link] [comments]
  •  

Subieron el precio de nuevo a Tigo

Subieron el precio de nuevo a Tigo

Este gobierno no iba a colocar otra empresa (o otras) de telefonia para terminar con el descarado monopolio de Tigo y Masmovil (Cable N Wireless)???

Hasta cuando, hijos, ya es descarado y tapan el sol con un dedo, los prepago estan subiendo de poco en poco. Antes era 1.07$ de 1 dia. Hace unos dias era 1.70 y pico con los itembs, ahora el de 1 dia es 1.85 con itbms.

submitted by /u/TakeabowRihanna to r/Panama
[link] [comments]
  •  

Advice on using a screenshot of navigation to design with

I am new to web design, and I am new to Figma, and I want to redesign a website. The website uses some template that I need to design within. The template consists of a logo, a banner and some navigation. I will be able to design what I need underneath this.

I want to take a screenshot of the top of this template to place into a Figma document, though I want the sizing to be accurate.

Please pardon my ignorance:

  1. What is the best way for me to get an accurate idea of the current resolution of the website? If I just take a screenshot of the header template isn't that just going to be based on the resolution settings on my display?

  2. Is there some way to view the source code to see the actual dimensions of the template content?

Thanks in advance

submitted by /u/torpedolife to r/web_design
[link] [comments]
  •  

Chainalysis Says Breach Exposed Credentials For All Customers

Chainalysis says attackers exposed usernames, password hashes and live tokens for all of its customers. "While the company locked Chainalysis accounts as a precaution after discovering that some customers' passwords had been exposed and asked users to reset their passwords before signing in again, it has now taken the login portal offline, together with Reactor and Data Solutions, the Know-Your-Transaction (KYT) user interface and API, and address screening products, after discovering further abnormal activity," reports BleepingComputer. The company says it has no evidence that investigative data or blockchain attribution records were accessed or altered, but all users will be required to reset passwords and rotate API keys before regaining access. BleepingComputer reports: Chainalysis provides blockchain analysis tools to trace cryptocurrency transactions and investigate crimes such as fraud, ransomware, and money laundering. Its customer list includes law enforcement, government agencies, financial institutions, insurance companies, and cryptocurrency businesses worldwide. This follows the company's disclosure last Friday that attackers using AI tools accessed customers' names, email addresses, user IDs, and organizational role labels using what it described as "offensive agentic techniques." While it initially said the impact was limited and the breach affected only non-sensitive identity metadata, later updates revealed that usernames and password hashes for all customers were exposed in an "on-path attack" (more commonly known as a Man-in-the-Middle or MITM attack). However, the company found no evidence that the attackers accessed investigative graph data or altered its blockchain attribution repositories. [...] To ensure threat actors don't access affected accounts, Chainalysis asked customers to provide trusted IP addresses so they can regain access to the login portal once it is brought back online and reset their credentials.

Read more of this story at Slashdot.

  •  
❌